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 --- 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 72 files changed, 40 insertions(+), 59 deletions(-) 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/tools') 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