summaryrefslogtreecommitdiff
path: root/chart2/source/model/template/ColumnChartType.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/model/template/ColumnChartType.cxx')
-rwxr-xr-x[-rw-r--r--]chart2/source/model/template/ColumnChartType.cxx29
1 files changed, 15 insertions, 14 deletions
diff --git a/chart2/source/model/template/ColumnChartType.cxx b/chart2/source/model/template/ColumnChartType.cxx
index aa11d77e8995..7393717846f5 100644..100755
--- 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();
}