From f0a13fa4339ee940f267fb8787d6137b148abec9 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 5 Oct 2010 11:10:54 +0200 Subject: chart49: #i113103# prevent deadlock caused by mixed mutex locking order wiht static variable initialization --- .../controller/chartapiwrapper/AreaWrapper.cxx | 30 +++++---- .../controller/chartapiwrapper/AreaWrapper.hxx | 0 .../controller/chartapiwrapper/AxisWrapper.cxx | 28 ++++---- .../controller/chartapiwrapper/AxisWrapper.hxx | 0 .../chartapiwrapper/Chart2ModelContact.cxx | 0 .../chartapiwrapper/Chart2ModelContact.hxx | 0 .../chartapiwrapper/ChartDataWrapper.cxx | 0 .../chartapiwrapper/ChartDataWrapper.hxx | 0 .../chartapiwrapper/ChartDocumentWrapper.cxx | 26 ++++---- .../chartapiwrapper/DataSeriesPointWrapper.cxx | 74 +++++++++++++--------- .../chartapiwrapper/DataSeriesPointWrapper.hxx | 0 .../controller/chartapiwrapper/DiagramWrapper.cxx | 26 ++++---- .../controller/chartapiwrapper/DiagramWrapper.hxx | 0 .../controller/chartapiwrapper/GridWrapper.cxx | 29 +++++---- .../controller/chartapiwrapper/GridWrapper.hxx | 0 .../controller/chartapiwrapper/LegendWrapper.cxx | 29 +++++---- .../controller/chartapiwrapper/LegendWrapper.hxx | 0 .../chartapiwrapper/MinMaxLineWrapper.cxx | 30 +++++---- .../chartapiwrapper/MinMaxLineWrapper.hxx | 0 .../ReferenceSizePropertyProvider.hxx | 0 .../controller/chartapiwrapper/TitleWrapper.cxx | 28 ++++---- .../controller/chartapiwrapper/TitleWrapper.hxx | 0 .../chartapiwrapper/UpDownBarWrapper.cxx | 30 +++++---- .../chartapiwrapper/UpDownBarWrapper.hxx | 0 .../chartapiwrapper/WallFloorWrapper.cxx | 28 ++++---- .../chartapiwrapper/WallFloorWrapper.hxx | 0 .../chartapiwrapper/WrappedAddInProperty.cxx | 0 .../chartapiwrapper/WrappedAddInProperty.hxx | 0 .../WrappedAutomaticPositionProperties.cxx | 0 .../WrappedAutomaticPositionProperties.hxx | 0 .../WrappedAxisAndGridExistenceProperties.cxx | 0 .../WrappedAxisAndGridExistenceProperties.hxx | 0 .../WrappedCharacterHeightProperty.cxx | 0 .../WrappedCharacterHeightProperty.hxx | 0 .../WrappedDataCaptionProperties.cxx | 0 .../WrappedDataCaptionProperties.hxx | 0 .../chartapiwrapper/WrappedGapwidthProperty.cxx | 0 .../chartapiwrapper/WrappedGapwidthProperty.hxx | 0 .../WrappedNumberFormatProperty.cxx | 0 .../WrappedNumberFormatProperty.hxx | 0 .../chartapiwrapper/WrappedScaleProperty.cxx | 0 .../chartapiwrapper/WrappedScaleProperty.hxx | 0 .../chartapiwrapper/WrappedScaleTextProperties.cxx | 0 .../chartapiwrapper/WrappedScaleTextProperties.hxx | 0 .../chartapiwrapper/WrappedSceneProperty.cxx | 0 .../chartapiwrapper/WrappedSceneProperty.hxx | 0 .../WrappedSeriesAreaOrLineProperty.cxx | 0 .../WrappedSeriesAreaOrLineProperty.hxx | 0 .../WrappedSeriesOrDiagramProperty.hxx | 0 .../chartapiwrapper/WrappedSplineProperties.cxx | 0 .../chartapiwrapper/WrappedSplineProperties.hxx | 0 .../chartapiwrapper/WrappedStatisticProperties.cxx | 0 .../chartapiwrapper/WrappedStatisticProperties.hxx | 0 .../chartapiwrapper/WrappedStockProperties.cxx | 0 .../chartapiwrapper/WrappedStockProperties.hxx | 0 .../chartapiwrapper/WrappedSymbolProperties.cxx | 0 .../chartapiwrapper/WrappedSymbolProperties.hxx | 0 .../WrappedTextRotationProperty.cxx | 0 .../WrappedTextRotationProperty.hxx | 0 chart2/source/model/inc/DataSeries.hxx | 4 -- chart2/source/model/main/Axis.cxx | 33 ++++------ chart2/source/model/main/Axis.hxx | 0 chart2/source/model/main/BaseCoordinateSystem.cxx | 29 ++++----- .../model/main/CartesianCoordinateSystem.cxx | 0 chart2/source/model/main/ChartModel.hxx | 0 .../source/model/main/ChartModel_Persistence.cxx | 0 chart2/source/model/main/DataPoint.cxx | 37 +++++------ chart2/source/model/main/DataPoint.hxx | 4 -- chart2/source/model/main/DataPointProperties.cxx | 0 chart2/source/model/main/DataPointProperties.hxx | 0 chart2/source/model/main/DataSeries.cxx | 32 +++++----- chart2/source/model/main/DataSeriesProperties.cxx | 0 chart2/source/model/main/DataSeriesProperties.hxx | 0 chart2/source/model/main/Diagram.cxx | 32 +++++----- chart2/source/model/main/FormattedString.cxx | 32 ++++------ chart2/source/model/main/FormattedString.hxx | 0 chart2/source/model/main/GridProperties.cxx | 35 +++++----- chart2/source/model/main/GridProperties.hxx | 0 chart2/source/model/main/LayoutContainer.cxx | 0 chart2/source/model/main/LayoutContainer.hxx | 0 chart2/source/model/main/Legend.cxx | 33 ++++------ chart2/source/model/main/Legend.hxx | 0 chart2/source/model/main/PageBackground.cxx | 32 ++++------ chart2/source/model/main/PageBackground.hxx | 0 chart2/source/model/main/PolarCoordinateSystem.cxx | 0 chart2/source/model/main/StockBar.cxx | 38 +++++------ chart2/source/model/main/Title.cxx | 33 ++++------ chart2/source/model/main/Title.hxx | 0 chart2/source/model/main/Wall.cxx | 32 ++++------ chart2/source/model/main/Wall.hxx | 0 .../model/main/_serviceregistration_model.cxx | 0 chart2/source/model/template/AreaChartType.cxx | 0 chart2/source/model/template/AreaChartType.hxx | 0 .../model/template/AreaChartTypeTemplate.cxx | 32 ++++------ .../model/template/AreaChartTypeTemplate.hxx | 0 chart2/source/model/template/BarChartType.cxx | 0 chart2/source/model/template/BarChartType.hxx | 0 .../source/model/template/BarChartTypeTemplate.cxx | 32 ++++------ .../source/model/template/BarChartTypeTemplate.hxx | 0 chart2/source/model/template/BubbleChartType.cxx | 29 ++++----- chart2/source/model/template/BubbleChartType.hxx | 0 .../model/template/BubbleChartTypeTemplate.cxx | 32 ++++------ .../model/template/BubbleChartTypeTemplate.hxx | 0 .../model/template/BubbleDataInterpreter.cxx | 0 .../model/template/BubbleDataInterpreter.hxx | 0 .../source/model/template/CandleStickChartType.cxx | 30 ++++----- .../source/model/template/CandleStickChartType.hxx | 0 chart2/source/model/template/ChartType.cxx | 0 chart2/source/model/template/ChartType.hxx | 0 chart2/source/model/template/ChartTypeManager.cxx | 0 chart2/source/model/template/ChartTypeTemplate.cxx | 0 chart2/source/model/template/ChartTypeTemplate.hxx | 0 chart2/source/model/template/ColumnChartType.cxx | 29 +++++---- chart2/source/model/template/ColumnChartType.hxx | 0 .../model/template/ColumnLineChartTypeTemplate.cxx | 32 ++++------ .../model/template/ColumnLineChartTypeTemplate.hxx | 0 .../model/template/ColumnLineDataInterpreter.cxx | 0 .../model/template/ColumnLineDataInterpreter.hxx | 0 chart2/source/model/template/DataInterpreter.cxx | 0 chart2/source/model/template/DataInterpreter.hxx | 0 .../source/model/template/FilledNetChartType.cxx | 0 .../source/model/template/FilledNetChartType.hxx | 0 chart2/source/model/template/LineChartType.cxx | 30 ++++----- chart2/source/model/template/LineChartType.hxx | 0 .../model/template/LineChartTypeTemplate.cxx | 32 ++++------ .../model/template/LineChartTypeTemplate.hxx | 0 chart2/source/model/template/NetChartType.cxx | 0 chart2/source/model/template/NetChartType.hxx | 0 .../source/model/template/NetChartTypeTemplate.cxx | 0 .../source/model/template/NetChartTypeTemplate.hxx | 0 chart2/source/model/template/PieChartType.cxx | 30 ++++----- chart2/source/model/template/PieChartType.hxx | 0 .../source/model/template/PieChartTypeTemplate.cxx | 32 ++++------ .../source/model/template/PieChartTypeTemplate.hxx | 0 chart2/source/model/template/ScatterChartType.cxx | 30 ++++----- chart2/source/model/template/ScatterChartType.hxx | 0 .../model/template/ScatterChartTypeTemplate.cxx | 32 ++++------ .../model/template/ScatterChartTypeTemplate.hxx | 0 .../model/template/StockChartTypeTemplate.cxx | 33 ++++------ .../model/template/StockChartTypeTemplate.hxx | 0 .../source/model/template/StockDataInterpreter.cxx | 0 .../source/model/template/StockDataInterpreter.hxx | 0 chart2/source/model/template/XYDataInterpreter.cxx | 0 chart2/source/model/template/XYDataInterpreter.hxx | 0 .../template/_serviceregistration_charttypes.cxx | 0 chart2/source/tools/AxisHelper.cxx | 0 chart2/source/tools/BaseGFXHelper.cxx | 0 chart2/source/tools/CachedDataSequence.cxx | 0 chart2/source/tools/CharacterProperties.cxx | 0 chart2/source/tools/ChartDebugTrace.cxx | 0 chart2/source/tools/ChartModelHelper.cxx | 0 chart2/source/tools/ChartTypeHelper.cxx | 0 chart2/source/tools/ChartViewHelper.cxx | 0 chart2/source/tools/ColorPerPointHelper.cxx | 0 chart2/source/tools/CommonConverters.cxx | 0 chart2/source/tools/ConfigColorScheme.cxx | 0 chart2/source/tools/ControllerLockGuard.cxx | 0 chart2/source/tools/DataSeriesHelper.cxx | 0 chart2/source/tools/DataSource.cxx | 0 chart2/source/tools/DataSourceHelper.cxx | 0 chart2/source/tools/DiagramHelper.cxx | 0 chart2/source/tools/ErrorBar.cxx | 32 ++++------ chart2/source/tools/ExplicitCategoriesProvider.cxx | 0 .../tools/ExponentialRegressionCurveCalculator.cxx | 0 chart2/source/tools/FillProperties.cxx | 0 chart2/source/tools/FormattedStringHelper.cxx | 0 chart2/source/tools/ImplOPropertySet.cxx | 0 chart2/source/tools/ImplOPropertySet.hxx | 0 chart2/source/tools/InternalDataProvider.cxx | 0 chart2/source/tools/LabeledDataSequence.cxx | 0 chart2/source/tools/LegendHelper.cxx | 0 chart2/source/tools/LifeTime.cxx | 0 chart2/source/tools/LineProperties.cxx | 0 .../tools/LinearRegressionCurveCalculator.cxx | 0 .../tools/LogarithmicRegressionCurveCalculator.cxx | 0 .../tools/MeanValueRegressionCurveCalculator.cxx | 0 chart2/source/tools/MediaDescriptorHelper.cxx | 0 chart2/source/tools/ModifyListenerCallBack.cxx | 0 chart2/source/tools/ModifyListenerHelper.cxx | 0 chart2/source/tools/MutexContainer.cxx | 0 chart2/source/tools/NameContainer.cxx | 0 chart2/source/tools/NamedFillProperties.cxx | 0 chart2/source/tools/NamedLineProperties.cxx | 0 chart2/source/tools/NamedProperties.cxx | 0 chart2/source/tools/OPropertySet.cxx | 0 chart2/source/tools/ObjectIdentifier.cxx | 0 .../tools/PotentialRegressionCurveCalculator.cxx | 0 chart2/source/tools/PropertyHelper.cxx | 0 chart2/source/tools/RangeHighlighter.cxx | 0 chart2/source/tools/ReferenceSizeProvider.cxx | 0 .../source/tools/RegressionCalculationHelper.hxx | 0 chart2/source/tools/RegressionCurveCalculator.cxx | 0 chart2/source/tools/RegressionCurveHelper.cxx | 0 chart2/source/tools/RegressionCurveModel.cxx | 33 ++++------ chart2/source/tools/RegressionCurveModel.hxx | 0 chart2/source/tools/RegressionEquation.cxx | 34 ++++------ chart2/source/tools/RegressionEquation.hxx | 0 chart2/source/tools/RelativePositionHelper.cxx | 0 chart2/source/tools/RelativeSizeHelper.cxx | 0 chart2/source/tools/ResId.cxx | 0 chart2/source/tools/RessourceManager.cxx | 0 chart2/source/tools/Scaling.cxx | 0 chart2/source/tools/SceneProperties.cxx | 0 chart2/source/tools/StatisticsHelper.cxx | 0 chart2/source/tools/ThreeDHelper.cxx | 0 chart2/source/tools/TitleHelper.cxx | 0 chart2/source/tools/TrueGuard.cxx | 0 chart2/source/tools/UncachedDataSequence.cxx | 0 chart2/source/tools/UserDefinedProperties.cxx | 0 chart2/source/tools/WeakListenerAdapter.cxx | 0 chart2/source/tools/WrappedDefaultProperty.cxx | 0 chart2/source/tools/WrappedDirectStateProperty.cxx | 0 chart2/source/tools/WrappedIgnoreProperty.cxx | 0 chart2/source/tools/WrappedProperty.cxx | 0 chart2/source/tools/WrappedPropertySet.cxx | 0 chart2/source/tools/XMLRangeHelper.cxx | 0 chart2/source/tools/_serviceregistration_tools.cxx | 0 217 files changed, 603 insertions(+), 695 deletions(-) mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/AreaWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/AreaWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/AxisWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/AxisWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/GridWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/GridWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/LegendWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/LegendWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/TitleWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedAddInProperty.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx mode change 100644 => 100755 chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx mode change 100644 => 100755 chart2/source/model/main/Axis.cxx mode change 100644 => 100755 chart2/source/model/main/Axis.hxx mode change 100644 => 100755 chart2/source/model/main/BaseCoordinateSystem.cxx mode change 100644 => 100755 chart2/source/model/main/CartesianCoordinateSystem.cxx mode change 100644 => 100755 chart2/source/model/main/ChartModel.hxx mode change 100644 => 100755 chart2/source/model/main/ChartModel_Persistence.cxx mode change 100644 => 100755 chart2/source/model/main/DataPoint.cxx mode change 100644 => 100755 chart2/source/model/main/DataPoint.hxx mode change 100644 => 100755 chart2/source/model/main/DataPointProperties.cxx mode change 100644 => 100755 chart2/source/model/main/DataPointProperties.hxx mode change 100644 => 100755 chart2/source/model/main/DataSeries.cxx mode change 100644 => 100755 chart2/source/model/main/DataSeriesProperties.cxx mode change 100644 => 100755 chart2/source/model/main/DataSeriesProperties.hxx mode change 100644 => 100755 chart2/source/model/main/Diagram.cxx mode change 100644 => 100755 chart2/source/model/main/FormattedString.cxx mode change 100644 => 100755 chart2/source/model/main/FormattedString.hxx mode change 100644 => 100755 chart2/source/model/main/GridProperties.cxx mode change 100644 => 100755 chart2/source/model/main/GridProperties.hxx mode change 100644 => 100755 chart2/source/model/main/LayoutContainer.cxx mode change 100644 => 100755 chart2/source/model/main/LayoutContainer.hxx mode change 100644 => 100755 chart2/source/model/main/Legend.cxx mode change 100644 => 100755 chart2/source/model/main/Legend.hxx mode change 100644 => 100755 chart2/source/model/main/PageBackground.cxx mode change 100644 => 100755 chart2/source/model/main/PageBackground.hxx mode change 100644 => 100755 chart2/source/model/main/PolarCoordinateSystem.cxx mode change 100644 => 100755 chart2/source/model/main/StockBar.cxx mode change 100644 => 100755 chart2/source/model/main/Title.cxx mode change 100644 => 100755 chart2/source/model/main/Title.hxx mode change 100644 => 100755 chart2/source/model/main/Wall.cxx mode change 100644 => 100755 chart2/source/model/main/Wall.hxx mode change 100644 => 100755 chart2/source/model/main/_serviceregistration_model.cxx mode change 100644 => 100755 chart2/source/model/template/AreaChartType.cxx mode change 100644 => 100755 chart2/source/model/template/AreaChartType.hxx mode change 100644 => 100755 chart2/source/model/template/AreaChartTypeTemplate.cxx mode change 100644 => 100755 chart2/source/model/template/AreaChartTypeTemplate.hxx mode change 100644 => 100755 chart2/source/model/template/BarChartType.cxx mode change 100644 => 100755 chart2/source/model/template/BarChartType.hxx mode change 100644 => 100755 chart2/source/model/template/BarChartTypeTemplate.cxx mode change 100644 => 100755 chart2/source/model/template/BarChartTypeTemplate.hxx mode change 100644 => 100755 chart2/source/model/template/BubbleChartType.cxx mode change 100644 => 100755 chart2/source/model/template/BubbleChartType.hxx mode change 100644 => 100755 chart2/source/model/template/BubbleChartTypeTemplate.cxx mode change 100644 => 100755 chart2/source/model/template/BubbleChartTypeTemplate.hxx mode change 100644 => 100755 chart2/source/model/template/BubbleDataInterpreter.cxx mode change 100644 => 100755 chart2/source/model/template/BubbleDataInterpreter.hxx mode change 100644 => 100755 chart2/source/model/template/CandleStickChartType.cxx mode change 100644 => 100755 chart2/source/model/template/CandleStickChartType.hxx mode change 100644 => 100755 chart2/source/model/template/ChartType.cxx mode change 100644 => 100755 chart2/source/model/template/ChartType.hxx mode change 100644 => 100755 chart2/source/model/template/ChartTypeManager.cxx mode change 100644 => 100755 chart2/source/model/template/ChartTypeTemplate.cxx mode change 100644 => 100755 chart2/source/model/template/ChartTypeTemplate.hxx mode change 100644 => 100755 chart2/source/model/template/ColumnChartType.cxx mode change 100644 => 100755 chart2/source/model/template/ColumnChartType.hxx mode change 100644 => 100755 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx mode change 100644 => 100755 chart2/source/model/template/ColumnLineChartTypeTemplate.hxx mode change 100644 => 100755 chart2/source/model/template/ColumnLineDataInterpreter.cxx mode change 100644 => 100755 chart2/source/model/template/ColumnLineDataInterpreter.hxx mode change 100644 => 100755 chart2/source/model/template/DataInterpreter.cxx mode change 100644 => 100755 chart2/source/model/template/DataInterpreter.hxx mode change 100644 => 100755 chart2/source/model/template/FilledNetChartType.cxx mode change 100644 => 100755 chart2/source/model/template/FilledNetChartType.hxx mode change 100644 => 100755 chart2/source/model/template/LineChartType.cxx mode change 100644 => 100755 chart2/source/model/template/LineChartType.hxx mode change 100644 => 100755 chart2/source/model/template/LineChartTypeTemplate.cxx mode change 100644 => 100755 chart2/source/model/template/LineChartTypeTemplate.hxx mode change 100644 => 100755 chart2/source/model/template/NetChartType.cxx mode change 100644 => 100755 chart2/source/model/template/NetChartType.hxx mode change 100644 => 100755 chart2/source/model/template/NetChartTypeTemplate.cxx mode change 100644 => 100755 chart2/source/model/template/NetChartTypeTemplate.hxx mode change 100644 => 100755 chart2/source/model/template/PieChartType.cxx mode change 100644 => 100755 chart2/source/model/template/PieChartType.hxx mode change 100644 => 100755 chart2/source/model/template/PieChartTypeTemplate.cxx mode change 100644 => 100755 chart2/source/model/template/PieChartTypeTemplate.hxx mode change 100644 => 100755 chart2/source/model/template/ScatterChartType.cxx mode change 100644 => 100755 chart2/source/model/template/ScatterChartType.hxx mode change 100644 => 100755 chart2/source/model/template/ScatterChartTypeTemplate.cxx mode change 100644 => 100755 chart2/source/model/template/ScatterChartTypeTemplate.hxx mode change 100644 => 100755 chart2/source/model/template/StockChartTypeTemplate.cxx mode change 100644 => 100755 chart2/source/model/template/StockChartTypeTemplate.hxx mode change 100644 => 100755 chart2/source/model/template/StockDataInterpreter.cxx mode change 100644 => 100755 chart2/source/model/template/StockDataInterpreter.hxx mode change 100644 => 100755 chart2/source/model/template/XYDataInterpreter.cxx mode change 100644 => 100755 chart2/source/model/template/XYDataInterpreter.hxx mode change 100644 => 100755 chart2/source/model/template/_serviceregistration_charttypes.cxx mode change 100644 => 100755 chart2/source/tools/AxisHelper.cxx mode change 100644 => 100755 chart2/source/tools/BaseGFXHelper.cxx mode change 100644 => 100755 chart2/source/tools/CachedDataSequence.cxx mode change 100644 => 100755 chart2/source/tools/CharacterProperties.cxx mode change 100644 => 100755 chart2/source/tools/ChartDebugTrace.cxx mode change 100644 => 100755 chart2/source/tools/ChartModelHelper.cxx mode change 100644 => 100755 chart2/source/tools/ChartTypeHelper.cxx mode change 100644 => 100755 chart2/source/tools/ChartViewHelper.cxx mode change 100644 => 100755 chart2/source/tools/ColorPerPointHelper.cxx mode change 100644 => 100755 chart2/source/tools/CommonConverters.cxx mode change 100644 => 100755 chart2/source/tools/ConfigColorScheme.cxx mode change 100644 => 100755 chart2/source/tools/ControllerLockGuard.cxx mode change 100644 => 100755 chart2/source/tools/DataSeriesHelper.cxx mode change 100644 => 100755 chart2/source/tools/DataSource.cxx mode change 100644 => 100755 chart2/source/tools/DataSourceHelper.cxx mode change 100644 => 100755 chart2/source/tools/DiagramHelper.cxx mode change 100644 => 100755 chart2/source/tools/ErrorBar.cxx mode change 100644 => 100755 chart2/source/tools/ExplicitCategoriesProvider.cxx mode change 100644 => 100755 chart2/source/tools/ExponentialRegressionCurveCalculator.cxx mode change 100644 => 100755 chart2/source/tools/FillProperties.cxx mode change 100644 => 100755 chart2/source/tools/FormattedStringHelper.cxx mode change 100644 => 100755 chart2/source/tools/ImplOPropertySet.cxx mode change 100644 => 100755 chart2/source/tools/ImplOPropertySet.hxx mode change 100644 => 100755 chart2/source/tools/InternalDataProvider.cxx mode change 100644 => 100755 chart2/source/tools/LabeledDataSequence.cxx mode change 100644 => 100755 chart2/source/tools/LegendHelper.cxx mode change 100644 => 100755 chart2/source/tools/LifeTime.cxx mode change 100644 => 100755 chart2/source/tools/LineProperties.cxx mode change 100644 => 100755 chart2/source/tools/LinearRegressionCurveCalculator.cxx mode change 100644 => 100755 chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx mode change 100644 => 100755 chart2/source/tools/MeanValueRegressionCurveCalculator.cxx mode change 100644 => 100755 chart2/source/tools/MediaDescriptorHelper.cxx mode change 100644 => 100755 chart2/source/tools/ModifyListenerCallBack.cxx mode change 100644 => 100755 chart2/source/tools/ModifyListenerHelper.cxx mode change 100644 => 100755 chart2/source/tools/MutexContainer.cxx mode change 100644 => 100755 chart2/source/tools/NameContainer.cxx mode change 100644 => 100755 chart2/source/tools/NamedFillProperties.cxx mode change 100644 => 100755 chart2/source/tools/NamedLineProperties.cxx mode change 100644 => 100755 chart2/source/tools/NamedProperties.cxx mode change 100644 => 100755 chart2/source/tools/OPropertySet.cxx mode change 100644 => 100755 chart2/source/tools/ObjectIdentifier.cxx mode change 100644 => 100755 chart2/source/tools/PotentialRegressionCurveCalculator.cxx mode change 100644 => 100755 chart2/source/tools/PropertyHelper.cxx mode change 100644 => 100755 chart2/source/tools/RangeHighlighter.cxx mode change 100644 => 100755 chart2/source/tools/ReferenceSizeProvider.cxx mode change 100644 => 100755 chart2/source/tools/RegressionCalculationHelper.hxx mode change 100644 => 100755 chart2/source/tools/RegressionCurveCalculator.cxx mode change 100644 => 100755 chart2/source/tools/RegressionCurveHelper.cxx mode change 100644 => 100755 chart2/source/tools/RegressionCurveModel.cxx mode change 100644 => 100755 chart2/source/tools/RegressionCurveModel.hxx mode change 100644 => 100755 chart2/source/tools/RegressionEquation.cxx mode change 100644 => 100755 chart2/source/tools/RegressionEquation.hxx mode change 100644 => 100755 chart2/source/tools/RelativePositionHelper.cxx mode change 100644 => 100755 chart2/source/tools/RelativeSizeHelper.cxx mode change 100644 => 100755 chart2/source/tools/ResId.cxx mode change 100644 => 100755 chart2/source/tools/RessourceManager.cxx mode change 100644 => 100755 chart2/source/tools/Scaling.cxx mode change 100644 => 100755 chart2/source/tools/SceneProperties.cxx mode change 100644 => 100755 chart2/source/tools/StatisticsHelper.cxx mode change 100644 => 100755 chart2/source/tools/ThreeDHelper.cxx mode change 100644 => 100755 chart2/source/tools/TitleHelper.cxx mode change 100644 => 100755 chart2/source/tools/TrueGuard.cxx mode change 100644 => 100755 chart2/source/tools/UncachedDataSequence.cxx mode change 100644 => 100755 chart2/source/tools/UserDefinedProperties.cxx mode change 100644 => 100755 chart2/source/tools/WeakListenerAdapter.cxx mode change 100644 => 100755 chart2/source/tools/WrappedDefaultProperty.cxx mode change 100644 => 100755 chart2/source/tools/WrappedDirectStateProperty.cxx mode change 100644 => 100755 chart2/source/tools/WrappedIgnoreProperty.cxx mode change 100644 => 100755 chart2/source/tools/WrappedProperty.cxx mode change 100644 => 100755 chart2/source/tools/WrappedPropertySet.cxx mode change 100644 => 100755 chart2/source/tools/XMLRangeHelper.cxx mode change 100644 => 100755 chart2/source/tools/_serviceregistration_tools.cxx (limited to 'chart2/source') diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx old mode 100644 new mode 100755 index 2e1636b4406b..b4422c5442ec --- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx @@ -57,31 +57,35 @@ namespace static const ::rtl::OUString lcl_aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.Area" )); -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticAreaWrapperPropertyArray_Initializer { - static Sequence< Property > aPropSeq; + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); + return &aPropSeq; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::LineProperties::AddPropertiesToVector( aProperties ); ::chart::FillProperties::AddPropertiesToVector( aProperties ); -// ::chart::NamedProperties::AddPropertiesToVector( aProperties ); + //::chart::NamedProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; + +struct StaticAreaWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticAreaWrapperPropertyArray_Initializer > +{ +}; + - return aPropSeq; -} } // anonymous namespace // -------------------------------------------------------------------------------- @@ -175,7 +179,7 @@ Reference< beans::XPropertySet > AreaWrapper::getInnerPropertySet() const Sequence< beans::Property >& AreaWrapper::getPropertySequence() { - return lcl_GetPropertySequence(); + return *StaticAreaWrapperPropertyArray::get(); } const std::vector< WrappedProperty* > AreaWrapper::createWrappedProperties() diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx old mode 100644 new mode 100755 index 6d53fb8b01f6..18c19427ce26 --- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx @@ -323,33 +323,35 @@ void lcl_AddPropertiesToVector( beans::PropertyAttribute::MAYBEDEFAULT )); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticAxisWrapperPropertyArray_Initializer { - static Sequence< Property > aPropSeq; + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); + return &aPropSeq; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); -// ::chart::NamedLineProperties::AddPropertiesToVector( aProperties ); + //::chart::NamedLineProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} +struct StaticAxisWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticAxisWrapperPropertyArray_Initializer > +{ +}; } // anonymous namespace @@ -532,7 +534,7 @@ Reference< beans::XPropertySet > AxisWrapper::getInnerPropertySet() const Sequence< beans::Property >& AxisWrapper::getPropertySequence() { - return lcl_GetPropertySequence(); + return *StaticAxisWrapperPropertyArray::get(); } const std::vector< WrappedProperty* > AxisWrapper::createWrappedProperties() diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx old mode 100644 new mode 100755 index edf8ad2b6209..a3e8eec763b2 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -249,28 +249,30 @@ void lcl_AddPropertiesToVector( | beans::PropertyAttribute::MAYBEDEFAULT ) ); } -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticChartDocumentWrapperPropertyArray_Initializer { - static uno::Sequence< Property > aPropSeq; + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); + return &aPropSeq; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} +struct StaticChartDocumentWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticChartDocumentWrapperPropertyArray_Initializer > +{ +}; } // anonymous namespace @@ -1582,7 +1584,7 @@ Reference< beans::XPropertySet > ChartDocumentWrapper::getInnerPropertySet() } const Sequence< beans::Property >& ChartDocumentWrapper::getPropertySequence() { - return lcl_GetPropertySequence(); + return *StaticChartDocumentWrapperPropertyArray::get(); } const std::vector< WrappedProperty* > ChartDocumentWrapper::createWrappedProperties() diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx old mode 100644 new mode 100755 index d69212512ebe..b79cab0930c6 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -173,44 +173,55 @@ void lcl_AddPropertiesToVector_SeriesOnly( | beans::PropertyAttribute::MAYBEDEFAULT )); } -const uno::Sequence< Property > & lcl_GetPropertySequence( DataSeriesPointWrapper::eType _eType ) +uno::Sequence< Property > lcl_GetPropertySequence( DataSeriesPointWrapper::eType _eType ) { - static uno::Sequence< Property > aSeriesPropSeq; - static uno::Sequence< Property > aPointPropSeq; + ::std::vector< ::com::sun::star::beans::Property > aProperties; - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - uno::Sequence< Property >& rPropSeq = - (_eType == DataSeriesPointWrapper::DATA_SERIES) ? aSeriesPropSeq : aPointPropSeq; - if( 0 == rPropSeq.getLength() ) + lcl_AddPropertiesToVector_PointProperties( aProperties ); + if( _eType == DataSeriesPointWrapper::DATA_SERIES ) { - // get properties - ::std::vector< ::com::sun::star::beans::Property > aProperties; + lcl_AddPropertiesToVector_SeriesOnly( aProperties ); + WrappedStatisticProperties::addProperties( aProperties ); + } + WrappedSymbolProperties::addProperties( aProperties ); //for series and points + WrappedDataCaptionProperties::addProperties( aProperties ); //for series and points - lcl_AddPropertiesToVector_PointProperties( aProperties ); - if( _eType == DataSeriesPointWrapper::DATA_SERIES ) - { - lcl_AddPropertiesToVector_SeriesOnly( aProperties ); - WrappedStatisticProperties::addProperties( aProperties ); - } - WrappedSymbolProperties::addProperties( aProperties ); //for series and points - WrappedDataCaptionProperties::addProperties( aProperties ); //for series and points + ::chart::FillProperties::AddPropertiesToVector( aProperties ); + ::chart::LineProperties::AddPropertiesToVector( aProperties ); + ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); + ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); + ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties ); - ::chart::FillProperties::AddPropertiesToVector( aProperties ); - ::chart::LineProperties::AddPropertiesToVector( aProperties ); - ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); - ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties ); + ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // and sort them for access via bsearch - ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); +} - // transfer result to static Sequence - rPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); +struct StaticSeriesWrapperPropertyArray_Initializer +{ + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_SERIES ) ); + return &aPropSeq; } +}; - return rPropSeq; -} +struct StaticSeriesWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticSeriesWrapperPropertyArray_Initializer > +{ +}; + +struct StaticPointWrapperPropertyArray_Initializer +{ + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_POINT ) ); + return &aPropSeq; + } +}; + +struct StaticPointWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticPointWrapperPropertyArray_Initializer > +{ +}; //---------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------- @@ -706,7 +717,10 @@ Reference< beans::XPropertySet > DataSeriesPointWrapper::getInnerPropertySet() const Sequence< beans::Property >& DataSeriesPointWrapper::getPropertySequence() { - return lcl_GetPropertySequence( m_eType ); + if( m_eType == DATA_SERIES ) + return *StaticSeriesWrapperPropertyArray::get(); + else + return *StaticPointWrapperPropertyArray::get(); } const std::vector< WrappedProperty* > DataSeriesPointWrapper::createWrappedProperties() diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx old mode 100644 new mode 100755 index eb3c76dd2c40..64571805a87f --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -434,15 +434,17 @@ void lcl_AddPropertiesToVector( | beans::PropertyAttribute::MAYBEDEFAULT )); } -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticDiagramWrapperPropertyArray_Initializer { - static uno::Sequence< Property > aPropSeq; + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); + return &aPropSeq; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); @@ -456,16 +458,16 @@ const uno::Sequence< Property > & lcl_GetPropertySequence() WrappedStockProperties::addProperties( aProperties ); WrappedAutomaticPositionProperties::addProperties( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} +struct StaticDiagramWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticDiagramWrapperPropertyArray_Initializer > +{ +}; bool lcl_isXYChart( const Reference< chart2::XDiagram > xDiagram ) { @@ -2086,7 +2088,7 @@ Reference< beans::XPropertySet > DiagramWrapper::getInnerPropertySet() const Sequence< beans::Property >& DiagramWrapper::getPropertySequence() { - return lcl_GetPropertySequence(); + return *StaticDiagramWrapperPropertyArray::get(); } const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties() diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx old mode 100644 new mode 100755 index ff36c4cebcc7..c604e4da5273 --- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx @@ -59,30 +59,31 @@ namespace static const OUString lcl_aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.Grid" )); -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticGridWrapperPropertyArray_Initializer { - static Sequence< Property > aPropSeq; - - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); + return &aPropSeq; + } +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::LineProperties::AddPropertiesToVector( aProperties ); -// ::chart::NamedLineProperties::AddPropertiesToVector( aProperties ); + //::chart::NamedLineProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} +struct StaticGridWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticGridWrapperPropertyArray_Initializer > +{ +}; } // anonymous namespace @@ -179,7 +180,7 @@ Reference< beans::XPropertySet > GridWrapper::getInnerPropertySet() const Sequence< beans::Property >& GridWrapper::getPropertySequence() { - return lcl_GetPropertySequence(); + return *StaticGridWrapperPropertyArray::get(); } const std::vector< WrappedProperty* > GridWrapper::createWrappedProperties() diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.hxx b/chart2/source/controller/chartapiwrapper/GridWrapper.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx old mode 100644 new mode 100755 index 02ffcb942c99..5b71c7d3e768 --- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx @@ -246,35 +246,38 @@ void lcl_AddPropertiesToVector( beans::PropertyAttribute::MAYBEDEFAULT )); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticLegendWrapperPropertyArray_Initializer { - static Sequence< Property > aPropSeq; + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); + return &aPropSeq; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); ::chart::FillProperties::AddPropertiesToVector( aProperties ); -// ::chart::NamedProperties::AddPropertiesToVector( aProperties ); + //::chart::NamedProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); ::chart::wrapper::WrappedAutomaticPositionProperties::addProperties( aProperties ); ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; + +struct StaticLegendWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticLegendWrapperPropertyArray_Initializer > +{ +}; - return aPropSeq; -} } // anonymous namespace // -------------------------------------------------------------------------------- @@ -418,7 +421,7 @@ Reference< beans::XPropertySet > LegendWrapper::getInnerPropertySet() const Sequence< beans::Property >& LegendWrapper::getPropertySequence() { - return lcl_GetPropertySequence(); + return *StaticLegendWrapperPropertyArray::get(); } const std::vector< WrappedProperty* > LegendWrapper::createWrappedProperties() diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx old mode 100644 new mode 100755 index fdfc7c094aaf..fc4e285863e5 --- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx @@ -56,31 +56,33 @@ namespace static const OUString lcl_aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.ChartLine" )); -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticMinMaxLineWrapperPropertyArray_Initializer { - static Sequence< Property > aPropSeq; + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); + return &aPropSeq; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::LineProperties::AddPropertiesToVector( aProperties ); -// ::chart::NamedLineProperties::AddPropertiesToVector( aProperties ); + //::chart::NamedLineProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} +struct StaticMinMaxLineWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticMinMaxLineWrapperPropertyArray_Initializer > +{ +}; } // anonymous namespace @@ -139,7 +141,7 @@ void SAL_CALL MinMaxLineWrapper::removeEventListener( if(!m_pPropertyArrayHelper.get()) { sal_Bool bSorted = sal_True; - m_pPropertyArrayHelper = ::boost::shared_ptr< ::cppu::OPropertyArrayHelper >( new ::cppu::OPropertyArrayHelper( lcl_GetPropertySequence(), bSorted ) ); + m_pPropertyArrayHelper = ::boost::shared_ptr< ::cppu::OPropertyArrayHelper >( new ::cppu::OPropertyArrayHelper( *StaticMinMaxLineWrapperPropertyArray::get(), bSorted ) ); } // \-- } @@ -383,7 +385,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyDefault( const ::rtl::OUString& void SAL_CALL MinMaxLineWrapper::setAllPropertiesToDefault( ) throw (uno::RuntimeException) { - const Sequence< beans::Property >& rPropSeq = lcl_GetPropertySequence(); + const Sequence< beans::Property >& rPropSeq = *StaticMinMaxLineWrapperPropertyArray::get(); for(sal_Int32 nN=0; nN & lcl_GetPropertySequence() +struct StaticTitleWrapperPropertyArray_Initializer { - static Sequence< Property > aPropSeq; + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); + return &aPropSeq; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); ::chart::FillProperties::AddPropertiesToVector( aProperties ); -// ::chart::NamedProperties::AddPropertiesToVector( aProperties ); + //::chart::NamedProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); ::chart::wrapper::WrappedAutomaticPositionProperties::addProperties( aProperties ); ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} +struct StaticTitleWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticTitleWrapperPropertyArray_Initializer > +{ +}; } // anonymous namespace @@ -526,7 +528,7 @@ Reference< beans::XPropertySet > TitleWrapper::getInnerPropertySet() const Sequence< beans::Property >& TitleWrapper::getPropertySequence() { - return lcl_GetPropertySequence(); + return *StaticTitleWrapperPropertyArray::get(); } const std::vector< WrappedProperty* > TitleWrapper::createWrappedProperties() diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx old mode 100644 new mode 100755 index 338131c4f973..241125169500 --- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx @@ -57,32 +57,34 @@ namespace static const OUString lcl_aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.ChartArea" )); -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticUpDownBarWrapperPropertyArray_Initializer { - static Sequence< Property > aPropSeq; + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); + return &aPropSeq; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::LineProperties::AddPropertiesToVector( aProperties ); ::chart::FillProperties::AddPropertiesToVector( aProperties ); -// ::chart::NamedProperties::AddPropertiesToVector( aProperties ); + //::chart::NamedProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} +struct StaticUpDownBarWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticUpDownBarWrapperPropertyArray_Initializer > +{ +}; } // anonymous namespace @@ -143,7 +145,7 @@ void SAL_CALL UpDownBarWrapper::removeEventListener( if(!m_pPropertyArrayHelper.get()) { sal_Bool bSorted = sal_True; - m_pPropertyArrayHelper = ::boost::shared_ptr< ::cppu::OPropertyArrayHelper >( new ::cppu::OPropertyArrayHelper( lcl_GetPropertySequence(), bSorted ) ); + m_pPropertyArrayHelper = ::boost::shared_ptr< ::cppu::OPropertyArrayHelper >( new ::cppu::OPropertyArrayHelper( *StaticUpDownBarWrapperPropertyArray::get(), bSorted ) ); } // \-- } @@ -349,7 +351,7 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyDefault( const ::rtl::OUString& r void SAL_CALL UpDownBarWrapper::setAllPropertiesToDefault( ) throw (uno::RuntimeException) { - const Sequence< beans::Property >& rPropSeq = lcl_GetPropertySequence(); + const Sequence< beans::Property >& rPropSeq = *StaticUpDownBarWrapperPropertyArray::get(); for(sal_Int32 nN=0; nN & lcl_GetPropertySequence() +struct StaticWallFloorWrapperPropertyArray_Initializer { - static Sequence< Property > aPropSeq; + Sequence< Property >* operator()() + { + static Sequence< Property > aPropSeq( lcl_GetPropertySequence() ); + return &aPropSeq; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::FillProperties::AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); -// ::chart::NamedProperties::AddPropertiesToVector( aProperties ); + //::chart::NamedProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} +struct StaticWallFloorWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticWallFloorWrapperPropertyArray_Initializer > +{ +}; } // anonymous namespace @@ -155,7 +157,7 @@ Reference< beans::XPropertySet > WallFloorWrapper::getInnerPropertySet() const Sequence< beans::Property >& WallFloorWrapper::getPropertySequence() { - return lcl_GetPropertySequence(); + return *StaticWallFloorWrapperPropertyArray::get(); } const std::vector< WrappedProperty* > WallFloorWrapper::createWrappedProperties() diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedAddInProperty.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesAreaOrLineProperty.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/inc/DataSeries.hxx b/chart2/source/model/inc/DataSeries.hxx index e05bac782b86..c557e537da70 100644 --- a/chart2/source/model/inc/DataSeries.hxx +++ b/chart2/source/model/inc/DataSeries.hxx @@ -198,10 +198,6 @@ protected: void fireModifyEvent(); - /** const variant of getInfoHelper() - */ - ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelperConst() const; - private: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx old mode 100644 new mode 100755 index fd1d78ebe071..2652b7464a7c --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -217,40 +217,33 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_MARK_POSITION, ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticAxisInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} - -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticAxisInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticAxisInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; typedef uno::Reference< beans::XPropertySet > lcl_tSubGridType; typedef uno::Sequence< lcl_tSubGridType > lcl_tSubGridSeq; @@ -602,7 +595,7 @@ uno::Any Axis::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL Axis::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticAxisInfoHelper::get(); } diff --git a/chart2/source/model/main/Axis.hxx b/chart2/source/model/main/Axis.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx old mode 100644 new mode 100755 index 4fa58cff5039..ae5db41da2b8 --- a/chart2/source/model/main/BaseCoordinateSystem.cxx +++ b/chart2/source/model/main/BaseCoordinateSystem.cxx @@ -75,29 +75,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_COORDINATESYSTEM_SWAPXANDYAXIS, false ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticCooSysInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} +struct StaticCooSysInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticCooSysInfoHelper_Initializer > +{ +}; } // anonymous namespace @@ -375,10 +377,7 @@ uno::Any BaseCoordinateSystem::GetDefaultValue( sal_Int32 nHandle ) const // ____ OPropertySet ____ ::cppu::IPropertyArrayHelper & SAL_CALL BaseCoordinateSystem::getInfoHelper() { - static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; + return *StaticCooSysInfoHelper::get(); } diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/ChartModel.hxx b/chart2/source/model/main/ChartModel.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx old mode 100644 new mode 100755 index 9340ddd175a9..5cd4cfef7f28 --- a/chart2/source/model/main/DataPoint.cxx +++ b/chart2/source/model/main/DataPoint.cxx @@ -53,30 +53,34 @@ using ::rtl::OUString; namespace { -const Sequence< Property > & lcl_GetPropertySequence() + +struct StaticDataPointInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::DataPointProperties::AddPropertiesToVector( aProperties ); ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; + +struct StaticDataPointInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticDataPointInfoHelper_Initializer > +{ +}; - return aPropSeq; -} } // anonymous namespace // ____________________________________________________________ @@ -214,16 +218,7 @@ void SAL_CALL DataPoint::setFastPropertyValue_NoBroadcast( ::cppu::IPropertyArrayHelper & SAL_CALL DataPoint::getInfoHelper() { - return getInfoHelperConst(); -} - -::cppu::IPropertyArrayHelper & SAL_CALL DataPoint::getInfoHelperConst() const -{ - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; + return *StaticDataPointInfoHelper::get(); } // ____ XPropertySet ____ diff --git a/chart2/source/model/main/DataPoint.hxx b/chart2/source/model/main/DataPoint.hxx old mode 100644 new mode 100755 index 38fcac717ca2..974899f42e24 --- a/chart2/source/model/main/DataPoint.hxx +++ b/chart2/source/model/main/DataPoint.hxx @@ -102,10 +102,6 @@ protected: throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); - /** const variant of getInfoHelper() - */ - ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelperConst() const; - // ____ XModifyBroadcaster ____ virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/DataPointProperties.hxx b/chart2/source/model/main/DataPointProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx old mode 100644 new mode 100755 index 89197aa5ba3f..cf0beedd0e71 --- a/chart2/source/model/main/DataSeries.cxx +++ b/chart2/source/model/main/DataSeries.cxx @@ -55,30 +55,34 @@ using ::osl::MutexGuard; namespace { -const uno::Sequence< Property > & lcl_GetPropertySequence() + +struct StaticDataSeriesInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::DataSeriesProperties::AddPropertiesToVector( aProperties ); ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; + +struct StaticDataSeriesInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticDataSeriesInfoHelper_Initializer > +{ +}; void lcl_SetParent( const uno::Reference< uno::XInterface > & xChildInterface, @@ -274,11 +278,7 @@ uno::Any DataSeries::GetDefaultValue( sal_Int32 nHandle ) const // ____ OPropertySet ____ ::cppu::IPropertyArrayHelper & SAL_CALL DataSeries::getInfoHelper() { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; + return *StaticDataSeriesInfoHelper::get(); } diff --git a/chart2/source/model/main/DataSeriesProperties.cxx b/chart2/source/model/main/DataSeriesProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/DataSeriesProperties.hxx b/chart2/source/model/main/DataSeriesProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx old mode 100644 new mode 100755 index ff8a0c4030bc..4f86fc9fac51 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -41,6 +41,7 @@ #include "DisposeHelper.hxx" #include "BaseGFXHelper.hxx" #include +#include #include #include #include @@ -188,30 +189,34 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticDiagramInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::SceneProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} + +}; + +struct StaticDiagramInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticDiagramInfoHelper_Initializer > +{ +}; /// clones a UNO-sequence of UNO-References typedef Reference< chart2::XCoordinateSystem > lcl_tCooSysRef; @@ -615,10 +620,7 @@ uno::Any Diagram::GetDefaultValue( sal_Int32 nHandle ) const // ____ OPropertySet ____ ::cppu::IPropertyArrayHelper & SAL_CALL Diagram::getInfoHelper() { - static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; + return *StaticDiagramInfoHelper::get(); } diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx old mode 100644 new mode 100755 index 9d38fafd3cf7..0486423db092 --- a/chart2/source/model/main/FormattedString.cxx +++ b/chart2/source/model/main/FormattedString.cxx @@ -47,37 +47,31 @@ using ::osl::MutexGuard; namespace { -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticFormattedStringInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticFormattedStringInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticFormattedStringInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -224,7 +218,7 @@ uno::Any FormattedString::GetDefaultValue( sal_Int32 nHandle ) const // ____ OPropertySet ____ ::cppu::IPropertyArrayHelper & SAL_CALL FormattedString::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticFormattedStringInfoHelper::get(); } diff --git a/chart2/source/model/main/FormattedString.hxx b/chart2/source/model/main/FormattedString.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx old mode 100644 new mode 100755 index a8d5be5d1453..5dbd51ecda43 --- a/chart2/source/model/main/GridProperties.cxx +++ b/chart2/source/model/main/GridProperties.cxx @@ -82,39 +82,34 @@ void lcl_addDefaultsToMap( ::chart::tPropertyValueMap & rOutMap ) rOutMap, ::chart::LineProperties::PROP_LINE_COLOR, 0xb3b3b3 ); // gray30 } -const Sequence< Property > & lcl_getPropertySequence() +struct StaticGridInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() -{ - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_getPropertySequence(), - /* bSorted = */ sal_True ); +}; - return aArrayHelper; -} +struct StaticGridInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticGridInfoHelper_Initializer > +{ +}; } // anonymous namespace @@ -168,7 +163,7 @@ uno::Any GridProperties::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL GridProperties::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticGridInfoHelper::get(); } // ____ XPropertySet ____ @@ -183,7 +178,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL if( !xInfo.is()) { xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( - lcl_getInfoHelper()); + getInfoHelper()); } return xInfo; diff --git a/chart2/source/model/main/GridProperties.hxx b/chart2/source/model/main/GridProperties.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/LayoutContainer.cxx b/chart2/source/model/main/LayoutContainer.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/LayoutContainer.hxx b/chart2/source/model/main/LayoutContainer.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx old mode 100644 new mode 100755 index c1143ecdf77a..ce9dbcac9ace --- a/chart2/source/model/main/Legend.cxx +++ b/chart2/source/model/main/Legend.cxx @@ -120,15 +120,17 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticLegendInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); @@ -136,25 +138,16 @@ const Sequence< Property > & lcl_GetPropertySequence() ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} - -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticLegendInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticLegendInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -334,7 +327,7 @@ Any Legend::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL Legend::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticLegendInfoHelper::get(); } diff --git a/chart2/source/model/main/Legend.hxx b/chart2/source/model/main/Legend.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx old mode 100644 new mode 100755 index 0dbe1d82fcf3..53854b049924 --- a/chart2/source/model/main/PageBackground.cxx +++ b/chart2/source/model/main/PageBackground.cxx @@ -61,39 +61,33 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::LineProperties::PROP_LINE_STYLE, drawing::LineStyle_NONE ); } -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticPageBackgroundInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::LineProperties::AddPropertiesToVector( aProperties ); ::chart::FillProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticPageBackgroundInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticPageBackgroundInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -157,7 +151,7 @@ uno::Any PageBackground::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL PageBackground::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticPageBackgroundInfoHelper::get(); } diff --git a/chart2/source/model/main/PageBackground.hxx b/chart2/source/model/main/PageBackground.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/StockBar.cxx b/chart2/source/model/main/StockBar.cxx old mode 100644 new mode 100755 index 9a3c7f8ab623..73639211677f --- a/chart2/source/model/main/StockBar.cxx +++ b/chart2/source/model/main/StockBar.cxx @@ -57,30 +57,33 @@ namespace static const ::rtl::OUString lcl_aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.StockBar" )); -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticStockBarInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::LineProperties::AddPropertiesToVector( aProperties ); ::chart::FillProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; + +struct StaticStockBarInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticStockBarInfoHelper_Initializer > +{ +}; void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap ) @@ -89,15 +92,6 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValue< sal_Int32 >( rOutMap, ::chart::FillProperties::PROP_FILL_COLOR, 0xffffff ); // white } -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() -{ - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} - } // anonymous namespace // ____________________________________________________________ @@ -170,7 +164,7 @@ uno::Any StockBar::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL StockBar::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticStockBarInfoHelper::get(); } // ____ XPropertySet ____ @@ -185,7 +179,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL if( !xInfo.is()) { xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( - lcl_getInfoHelper()); + getInfoHelper()); } return xInfo; diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx old mode 100644 new mode 100755 index d7c5691d160d..7081c1b96d36 --- a/chart2/source/model/main/Title.cxx +++ b/chart2/source/model/main/Title.cxx @@ -179,39 +179,34 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::LineProperties::PROP_LINE_STYLE, drawing::LineStyle_NONE ); } -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticTitleInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); ::chart::FillProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() -{ - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); +}; - return aArrayHelper; -} +struct StaticTitleInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticTitleInfoHelper_Initializer > +{ +}; } // anonymous namespace @@ -310,7 +305,7 @@ uno::Any Title::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL Title::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticTitleInfoHelper::get(); } diff --git a/chart2/source/model/main/Title.hxx b/chart2/source/model/main/Title.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx old mode 100644 new mode 100755 index 2ad00a4c90ae..5180191df49e --- a/chart2/source/model/main/Wall.cxx +++ b/chart2/source/model/main/Wall.cxx @@ -66,39 +66,33 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::LineProperties::PROP_LINE_STYLE, drawing::LineStyle_NONE ); } -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticWallInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::LineProperties::AddPropertiesToVector( aProperties ); ::chart::FillProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticWallInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticWallInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -163,7 +157,7 @@ uno::Any Wall::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL Wall::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticWallInfoHelper::get(); } diff --git a/chart2/source/model/main/Wall.hxx b/chart2/source/model/main/Wall.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/main/_serviceregistration_model.cxx b/chart2/source/model/main/_serviceregistration_model.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/AreaChartType.cxx b/chart2/source/model/template/AreaChartType.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/AreaChartType.hxx b/chart2/source/model/template/AreaChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx old mode 100644 new mode 100755 index 5fe21cfb25e0..98ee784d1bee --- a/chart2/source/model/template/AreaChartTypeTemplate.cxx +++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx @@ -76,37 +76,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_AREA_TEMPLATE_DIMENSION, 2 ); } -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticAreaChartTypeTemplateInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticAreaChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticAreaChartTypeTemplateInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -155,7 +149,7 @@ uno::Any AreaChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL AreaChartTypeTemplate::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticAreaChartTypeTemplateInfoHelper::get(); } diff --git a/chart2/source/model/template/AreaChartTypeTemplate.hxx b/chart2/source/model/template/AreaChartTypeTemplate.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/BarChartType.cxx b/chart2/source/model/template/BarChartType.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/BarChartType.hxx b/chart2/source/model/template/BarChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx old mode 100644 new mode 100755 index 01dc4c253d2b..2261a22af6d8 --- a/chart2/source/model/template/BarChartTypeTemplate.cxx +++ b/chart2/source/model/template/BarChartTypeTemplate.cxx @@ -84,37 +84,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_BAR_TEMPLATE_GEOMETRY3D, ::chart2::DataPointGeometry3D::CUBOID ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticBarChartTypeTemplateInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticBarChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticBarChartTypeTemplateInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -248,7 +242,7 @@ uno::Any BarChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL BarChartTypeTemplate::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticBarChartTypeTemplateInfoHelper::get(); } diff --git a/chart2/source/model/template/BarChartTypeTemplate.hxx b/chart2/source/model/template/BarChartTypeTemplate.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/BubbleChartType.cxx b/chart2/source/model/template/BubbleChartType.cxx old mode 100644 new mode 100755 index 9922ed4df5fb..37438d4c4744 --- a/chart2/source/model/template/BubbleChartType.cxx +++ b/chart2/source/model/template/BubbleChartType.cxx @@ -61,28 +61,30 @@ void lcl_AddDefaultsToMap( { } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticBubbleChartTypeInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} +struct StaticBubbleChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticBubbleChartTypeInfoHelper_Initializer > +{ +}; } // anonymous namespace @@ -200,10 +202,7 @@ uno::Any BubbleChartType::GetDefaultValue( sal_Int32 nHandle ) const // ____ OPropertySet ____ ::cppu::IPropertyArrayHelper & SAL_CALL BubbleChartType::getInfoHelper() { - static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; + return *StaticBubbleChartTypeInfoHelper::get(); } diff --git a/chart2/source/model/template/BubbleChartType.hxx b/chart2/source/model/template/BubbleChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx b/chart2/source/model/template/BubbleChartTypeTemplate.cxx old mode 100644 new mode 100755 index 59b552cc8995..5c05960ecb5b --- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx +++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx @@ -70,37 +70,31 @@ void lcl_AddDefaultsToMap( { } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticBubbleChartTypeTemplateInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticBubbleChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticBubbleChartTypeTemplateInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -145,7 +139,7 @@ uno::Any BubbleChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL BubbleChartTypeTemplate::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticBubbleChartTypeTemplateInfoHelper::get(); } diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.hxx b/chart2/source/model/template/BubbleChartTypeTemplate.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx b/chart2/source/model/template/BubbleDataInterpreter.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/BubbleDataInterpreter.hxx b/chart2/source/model/template/BubbleDataInterpreter.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/CandleStickChartType.cxx b/chart2/source/model/template/CandleStickChartType.cxx old mode 100644 new mode 100755 index 22c8e058ea53..19c65522338c --- a/chart2/source/model/template/CandleStickChartType.cxx +++ b/chart2/source/model/template/CandleStickChartType.cxx @@ -106,28 +106,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CANDLESTICKCHARTTYPE_SHOW_HIGH_LOW, true ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticCandleStickChartTypeInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; + +struct StaticCandleStickChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticCandleStickChartTypeInfoHelper_Initializer > +{ +}; } // anonymous namespace @@ -284,10 +287,7 @@ uno::Any CandleStickChartType::GetDefaultValue( sal_Int32 nHandle ) const // ____ OPropertySet ____ ::cppu::IPropertyArrayHelper & SAL_CALL CandleStickChartType::getInfoHelper() { - static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; + return *StaticCandleStickChartTypeInfoHelper::get(); } diff --git a/chart2/source/model/template/CandleStickChartType.hxx b/chart2/source/model/template/CandleStickChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ChartType.hxx b/chart2/source/model/template/ChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ChartTypeTemplate.hxx b/chart2/source/model/template/ChartTypeTemplate.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ColumnChartType.cxx b/chart2/source/model/template/ColumnChartType.cxx old mode 100644 new mode 100755 index aa11d77e8995..7393717846f5 --- a/chart2/source/model/template/ColumnChartType.cxx +++ b/chart2/source/model/template/ColumnChartType.cxx @@ -79,28 +79,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_BARCHARTTYPE_GAPWIDTH_SEQUENCE, aSeq ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticColumnChartTypeInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; + +struct StaticColumnChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticColumnChartTypeInfoHelper_Initializer > +{ +}; } // anonymous namespace @@ -160,9 +163,7 @@ uno::Any ColumnChartType::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL ColumnChartType::getInfoHelper() { - static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - return aArrayHelper; + return *StaticColumnChartTypeInfoHelper::get(); } diff --git a/chart2/source/model/template/ColumnChartType.hxx b/chart2/source/model/template/ColumnChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx old mode 100644 new mode 100755 index 663cad4c2fe4..8ed512eba408 --- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx @@ -82,37 +82,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_COL_LINE_NUMBER_OF_LINES, 1 ); } -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticColumnLineChartTypeTemplateInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticColumnLineChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticColumnLineChartTypeTemplateInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -161,7 +155,7 @@ uno::Any ColumnLineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL ColumnLineChartTypeTemplate::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticColumnLineChartTypeTemplateInfoHelper::get(); } diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ColumnLineDataInterpreter.cxx b/chart2/source/model/template/ColumnLineDataInterpreter.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ColumnLineDataInterpreter.hxx b/chart2/source/model/template/ColumnLineDataInterpreter.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/DataInterpreter.hxx b/chart2/source/model/template/DataInterpreter.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/FilledNetChartType.cxx b/chart2/source/model/template/FilledNetChartType.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/FilledNetChartType.hxx b/chart2/source/model/template/FilledNetChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/LineChartType.cxx b/chart2/source/model/template/LineChartType.cxx old mode 100644 new mode 100755 index f96d7ed1297d..166d037d1a1d --- a/chart2/source/model/template/LineChartType.cxx +++ b/chart2/source/model/template/LineChartType.cxx @@ -89,28 +89,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_LINECHARTTYPE_SPLINE_ORDER, 3 ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticLineChartTypeInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; + +struct StaticLineChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticLineChartTypeInfoHelper_Initializer > +{ +}; } // anonymous namespace @@ -172,10 +175,7 @@ uno::Any LineChartType::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL LineChartType::getInfoHelper() { - static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; + return *StaticLineChartTypeInfoHelper::get(); } diff --git a/chart2/source/model/template/LineChartType.hxx b/chart2/source/model/template/LineChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx old mode 100644 new mode 100755 index 8d582178a128..454ee975e1e5 --- a/chart2/source/model/template/LineChartTypeTemplate.cxx +++ b/chart2/source/model/template/LineChartTypeTemplate.cxx @@ -99,37 +99,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, 3 ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticLineChartTypeTemplateInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticLineChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticLineChartTypeTemplateInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -183,7 +177,7 @@ uno::Any LineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL LineChartTypeTemplate::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticLineChartTypeTemplateInfoHelper::get(); } diff --git a/chart2/source/model/template/LineChartTypeTemplate.hxx b/chart2/source/model/template/LineChartTypeTemplate.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/NetChartType.cxx b/chart2/source/model/template/NetChartType.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/NetChartType.hxx b/chart2/source/model/template/NetChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx b/chart2/source/model/template/NetChartTypeTemplate.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/NetChartTypeTemplate.hxx b/chart2/source/model/template/NetChartTypeTemplate.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx old mode 100644 new mode 100755 index 9c199bb23d70..5e1decd73a72 --- a/chart2/source/model/template/PieChartType.cxx +++ b/chart2/source/model/template/PieChartType.cxx @@ -73,28 +73,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIECHARTTYPE_USE_RINGS, false ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticPieChartTypeInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; + +struct StaticPieChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticPieChartTypeInfoHelper_Initializer > +{ +}; } // anonymous namespace @@ -197,10 +200,7 @@ uno::Any PieChartType::GetDefaultValue( sal_Int32 nHandle ) const // ____ OPropertySet ____ ::cppu::IPropertyArrayHelper & SAL_CALL PieChartType::getInfoHelper() { - static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; + return *StaticPieChartTypeInfoHelper::get(); } diff --git a/chart2/source/model/template/PieChartType.hxx b/chart2/source/model/template/PieChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx old mode 100644 new mode 100755 index c16682846d53..2bb58e7ddbb6 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -109,37 +109,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PIE_TEMPLATE_USE_RINGS, false ); } -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticPieChartTypeTemplateInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticPieChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticPieChartTypeTemplateInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -190,7 +184,7 @@ uno::Any PieChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL PieChartTypeTemplate::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticPieChartTypeTemplateInfoHelper::get(); } diff --git a/chart2/source/model/template/PieChartTypeTemplate.hxx b/chart2/source/model/template/PieChartTypeTemplate.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ScatterChartType.cxx b/chart2/source/model/template/ScatterChartType.cxx old mode 100644 new mode 100755 index 8c4ab0d18415..559711794405 --- a/chart2/source/model/template/ScatterChartType.cxx +++ b/chart2/source/model/template/ScatterChartType.cxx @@ -93,28 +93,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_SCATTERCHARTTYPE_SPLINE_ORDER, 3 ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticScatterChartTypeInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; + +struct StaticScatterChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticScatterChartTypeInfoHelper_Initializer > +{ +}; } // anonymous namespace @@ -254,10 +257,7 @@ uno::Any ScatterChartType::GetDefaultValue( sal_Int32 nHandle ) const // ____ OPropertySet ____ ::cppu::IPropertyArrayHelper & SAL_CALL ScatterChartType::getInfoHelper() { - static ::cppu::OPropertyArrayHelper aArrayHelper( lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; + return *StaticScatterChartTypeInfoHelper::get(); } diff --git a/chart2/source/model/template/ScatterChartType.hxx b/chart2/source/model/template/ScatterChartType.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx old mode 100644 new mode 100755 index a83d9a8a4ea3..d462c2fa489d --- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx +++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx @@ -101,37 +101,31 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER, 3 ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticScatterChartTypeTemplateInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticScatterChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticScatterChartTypeTemplateInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -184,7 +178,7 @@ uno::Any ScatterChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL ScatterChartTypeTemplate::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticScatterChartTypeTemplateInfoHelper::get(); } diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.hxx b/chart2/source/model/template/ScatterChartTypeTemplate.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx old mode 100644 new mode 100755 index 00ace6c330ad..98e7d3269825 --- a/chart2/source/model/template/StockChartTypeTemplate.cxx +++ b/chart2/source/model/template/StockChartTypeTemplate.cxx @@ -113,37 +113,30 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_STOCKCHARTTYPE_TEMPLATE_JAPANESE, false ); } -const Sequence< Property > & lcl_GetPropertySequence() +struct StaticStockChartTypeTemplateInfoHelper_Initializer { - static Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} - -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticStockChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticStockChartTypeTemplateInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace // ---------------------------------------- @@ -202,7 +195,7 @@ uno::Any StockChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL StockChartTypeTemplate::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticStockChartTypeTemplateInfoHelper::get(); } diff --git a/chart2/source/model/template/StockChartTypeTemplate.hxx b/chart2/source/model/template/StockChartTypeTemplate.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/StockDataInterpreter.cxx b/chart2/source/model/template/StockDataInterpreter.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/StockDataInterpreter.hxx b/chart2/source/model/template/StockDataInterpreter.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/XYDataInterpreter.cxx b/chart2/source/model/template/XYDataInterpreter.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/XYDataInterpreter.hxx b/chart2/source/model/template/XYDataInterpreter.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/model/template/_serviceregistration_charttypes.cxx b/chart2/source/model/template/_serviceregistration_charttypes.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/BaseGFXHelper.cxx b/chart2/source/tools/BaseGFXHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ChartDebugTrace.cxx b/chart2/source/tools/ChartDebugTrace.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ChartViewHelper.cxx b/chart2/source/tools/ChartViewHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ColorPerPointHelper.cxx b/chart2/source/tools/ColorPerPointHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ControllerLockGuard.cxx b/chart2/source/tools/ControllerLockGuard.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx old mode 100644 new mode 100755 index 7468d8bb7896..e1500a5e16b5 --- a/chart2/source/tools/ErrorBar.cxx +++ b/chart2/source/tools/ErrorBar.cxx @@ -118,38 +118,32 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_ERROR_BAR_SHOW_NEG_ERROR, true ); } -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticErrorBarInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticErrorBarInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticErrorBarInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq ) { @@ -231,7 +225,7 @@ uno::Any ErrorBar::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL ErrorBar::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticErrorBarInfoHelper::get(); } diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/FillProperties.cxx b/chart2/source/tools/FillProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/FormattedStringHelper.cxx b/chart2/source/tools/FormattedStringHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ImplOPropertySet.cxx b/chart2/source/tools/ImplOPropertySet.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ImplOPropertySet.hxx b/chart2/source/tools/ImplOPropertySet.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/LabeledDataSequence.cxx b/chart2/source/tools/LabeledDataSequence.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/LegendHelper.cxx b/chart2/source/tools/LegendHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/LineProperties.cxx b/chart2/source/tools/LineProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/LinearRegressionCurveCalculator.cxx b/chart2/source/tools/LinearRegressionCurveCalculator.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/MediaDescriptorHelper.cxx b/chart2/source/tools/MediaDescriptorHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ModifyListenerCallBack.cxx b/chart2/source/tools/ModifyListenerCallBack.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ModifyListenerHelper.cxx b/chart2/source/tools/ModifyListenerHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/MutexContainer.cxx b/chart2/source/tools/MutexContainer.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/NameContainer.cxx b/chart2/source/tools/NameContainer.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/NamedFillProperties.cxx b/chart2/source/tools/NamedFillProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/NamedLineProperties.cxx b/chart2/source/tools/NamedLineProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/NamedProperties.cxx b/chart2/source/tools/NamedProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/OPropertySet.cxx b/chart2/source/tools/OPropertySet.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/PropertyHelper.cxx b/chart2/source/tools/PropertyHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/RegressionCalculationHelper.hxx b/chart2/source/tools/RegressionCalculationHelper.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/RegressionCurveModel.cxx b/chart2/source/tools/RegressionCurveModel.cxx old mode 100644 new mode 100755 index cf5be998308e..02c3e164e742 --- a/chart2/source/tools/RegressionCurveModel.cxx +++ b/chart2/source/tools/RegressionCurveModel.cxx @@ -63,37 +63,30 @@ static const OUString lcl_aImplementationName_Potential( static const OUString lcl_aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.RegressionCurve" )); -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticRegressionCurveInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; ::chart::LineProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } +}; - return aPropSeq; -} - -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticRegressionCurveInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticRegressionCurveInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -262,7 +255,7 @@ uno::Any RegressionCurveModel::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL RegressionCurveModel::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticRegressionCurveInfoHelper::get(); } diff --git a/chart2/source/tools/RegressionCurveModel.hxx b/chart2/source/tools/RegressionCurveModel.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx old mode 100644 new mode 100755 index ea16e5b7702a..747f673a9c34 --- a/chart2/source/tools/RegressionEquation.cxx +++ b/chart2/source/tools/RegressionEquation.cxx @@ -135,15 +135,17 @@ void lcl_AddDefaultsToMap( ::chart::PropertyHelper::setPropertyValue( rOutMap, ::chart::CharacterProperties::PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultCharHeight ); } -const uno::Sequence< Property > & lcl_GetPropertySequence() +struct StaticRegressionEquationInfoHelper_Initializer { - static uno::Sequence< Property > aPropSeq; + ::cppu::OPropertyArrayHelper* operator()() + { + static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() ); + return &aPropHelper; + } - // /-- - MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( 0 == aPropSeq.getLength() ) +private: + uno::Sequence< Property > lcl_GetPropertySequence() { - // get properties ::std::vector< ::com::sun::star::beans::Property > aProperties; lcl_AddPropertiesToVector( aProperties ); ::chart::LineProperties::AddPropertiesToVector( aProperties ); @@ -151,25 +153,17 @@ const uno::Sequence< Property > & lcl_GetPropertySequence() ::chart::CharacterProperties::AddPropertiesToVector( aProperties ); ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties ); - // and sort them for access via bsearch ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() ); - // transfer result to static Sequence - aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties ); + return ::chart::ContainerHelper::ContainerToSequence( aProperties ); } - return aPropSeq; -} +}; -::cppu::IPropertyArrayHelper & lcl_getInfoHelper() +struct StaticRegressionEquationInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticRegressionEquationInfoHelper_Initializer > { - static ::cppu::OPropertyArrayHelper aArrayHelper( - lcl_GetPropertySequence(), - /* bSorted = */ sal_True ); - - return aArrayHelper; -} +}; } // anonymous namespace @@ -233,7 +227,7 @@ uno::Any RegressionEquation::GetDefaultValue( sal_Int32 nHandle ) const ::cppu::IPropertyArrayHelper & SAL_CALL RegressionEquation::getInfoHelper() { - return lcl_getInfoHelper(); + return *StaticRegressionEquationInfoHelper::get(); } // ____ XPropertySet ____ @@ -248,7 +242,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL if( !xInfo.is()) { xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( - lcl_getInfoHelper()); + getInfoHelper()); } return xInfo; diff --git a/chart2/source/tools/RegressionEquation.hxx b/chart2/source/tools/RegressionEquation.hxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/RelativePositionHelper.cxx b/chart2/source/tools/RelativePositionHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/RelativeSizeHelper.cxx b/chart2/source/tools/RelativeSizeHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ResId.cxx b/chart2/source/tools/ResId.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/RessourceManager.cxx b/chart2/source/tools/RessourceManager.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/SceneProperties.cxx b/chart2/source/tools/SceneProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/StatisticsHelper.cxx b/chart2/source/tools/StatisticsHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/TrueGuard.cxx b/chart2/source/tools/TrueGuard.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/UserDefinedProperties.cxx b/chart2/source/tools/UserDefinedProperties.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/WeakListenerAdapter.cxx b/chart2/source/tools/WeakListenerAdapter.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/WrappedDefaultProperty.cxx b/chart2/source/tools/WrappedDefaultProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/WrappedDirectStateProperty.cxx b/chart2/source/tools/WrappedDirectStateProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/WrappedIgnoreProperty.cxx b/chart2/source/tools/WrappedIgnoreProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/WrappedProperty.cxx b/chart2/source/tools/WrappedProperty.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/XMLRangeHelper.cxx b/chart2/source/tools/XMLRangeHelper.cxx old mode 100644 new mode 100755 diff --git a/chart2/source/tools/_serviceregistration_tools.cxx b/chart2/source/tools/_serviceregistration_tools.cxx old mode 100644 new mode 100755 -- cgit