summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngrid Halama <iha@openoffice.org>2010-10-06 13:53:07 +0200
committerIngrid Halama <iha@openoffice.org>2010-10-06 13:53:07 +0200
commit63af9d6233ba3858a66a1f634d7f7fd7acdc03fa (patch)
treebc97661de4944e02437300e8b617bf6a52b6b210
parentf0a13fa4339ee940f267fb8787d6137b148abec9 (diff)
chart49: #i113103# use corrected double-checked locking pattern for propertysetinfo
-rwxr-xr-xchart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx57
-rwxr-xr-xchart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx6
-rwxr-xr-xchart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx57
-rwxr-xr-xchart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx5
-rw-r--r--chart2/source/inc/OPropertySet.hxx33
-rwxr-xr-xchart2/source/model/main/Axis.cxx31
-rwxr-xr-xchart2/source/model/main/BaseCoordinateSystem.cxx30
-rwxr-xr-xchart2/source/model/main/DataPoint.cxx30
-rwxr-xr-xchart2/source/model/main/DataSeries.cxx31
-rwxr-xr-xchart2/source/model/main/Diagram.cxx31
-rwxr-xr-xchart2/source/model/main/FormattedString.cxx30
-rwxr-xr-xchart2/source/model/main/GridProperties.cxx30
-rwxr-xr-xchart2/source/model/main/Legend.cxx31
-rwxr-xr-xchart2/source/model/main/PageBackground.cxx32
-rwxr-xr-xchart2/source/model/main/StockBar.cxx31
-rwxr-xr-xchart2/source/model/main/Title.cxx31
-rwxr-xr-xchart2/source/model/main/Wall.cxx31
-rwxr-xr-xchart2/source/model/template/AreaChartTypeTemplate.cxx31
-rwxr-xr-xchart2/source/model/template/BarChartTypeTemplate.cxx31
-rwxr-xr-xchart2/source/model/template/BubbleChartType.cxx31
-rwxr-xr-xchart2/source/model/template/BubbleChartTypeTemplate.cxx31
-rwxr-xr-xchart2/source/model/template/CandleStickChartType.cxx31
-rwxr-xr-xchart2/source/model/template/ChartType.cxx57
-rwxr-xr-xchart2/source/model/template/ColumnChartType.cxx31
-rwxr-xr-xchart2/source/model/template/ColumnLineChartTypeTemplate.cxx31
-rwxr-xr-xchart2/source/model/template/LineChartType.cxx31
-rwxr-xr-xchart2/source/model/template/LineChartTypeTemplate.cxx31
-rwxr-xr-xchart2/source/model/template/NetChartType.cxx54
-rwxr-xr-xchart2/source/model/template/PieChartType.cxx31
-rwxr-xr-xchart2/source/model/template/PieChartTypeTemplate.cxx32
-rwxr-xr-xchart2/source/model/template/ScatterChartType.cxx31
-rwxr-xr-xchart2/source/model/template/ScatterChartTypeTemplate.cxx31
-rwxr-xr-xchart2/source/model/template/StockChartTypeTemplate.cxx31
-rwxr-xr-xchart2/source/tools/ErrorBar.cxx31
-rwxr-xr-xchart2/source/tools/RegressionCurveModel.cxx31
-rwxr-xr-xchart2/source/tools/RegressionEquation.cxx31
-rwxr-xr-xchart2/source/tools/WrappedPropertySet.cxx64
37 files changed, 636 insertions, 594 deletions
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index fc4e285863e5..d9313960c08f 100755
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -84,6 +84,33 @@ struct StaticMinMaxLineWrapperPropertyArray : public rtl::StaticAggregate< Seque
{
};
+struct StaticMinMaxLineWrapperInfoHelper_Initializer
+{
+ ::cppu::OPropertyArrayHelper* operator()()
+ {
+ static ::cppu::OPropertyArrayHelper aPropHelper( *StaticMinMaxLineWrapperPropertyArray::get() );
+ return &aPropHelper;
+ }
+};
+
+struct StaticMinMaxLineWrapperInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticMinMaxLineWrapperInfoHelper_Initializer >
+{
+};
+
+struct StaticMinMaxLineWrapperInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticMinMaxLineWrapperInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticMinMaxLineWrapperInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticMinMaxLineWrapperInfo_Initializer >
+{
+};
+
} // anonymous namespace
// --------------------------------------------------------------------------------
@@ -96,7 +123,6 @@ namespace wrapper
MinMaxLineWrapper::MinMaxLineWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
: m_spChart2ModelContact( spChart2ModelContact )
, m_aEventListenerContainer( m_aMutex )
- , m_pPropertyArrayHelper()
, m_aWrappedLineJointProperty( C2U("LineJoint"), uno::makeAny( drawing::LineJoint_NONE ))
{
}
@@ -111,11 +137,6 @@ void SAL_CALL MinMaxLineWrapper::dispose()
{
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
-
- // /--
- MutexGuard aGuard( GetMutex());
- m_xInfo.clear();
- // \--
}
void SAL_CALL MinMaxLineWrapper::addEventListener(
@@ -134,34 +155,16 @@ void SAL_CALL MinMaxLineWrapper::removeEventListener(
::cppu::IPropertyArrayHelper& MinMaxLineWrapper::getInfoHelper()
{
- if(!m_pPropertyArrayHelper.get())
- {
- // /--
- ::osl::MutexGuard aGuard( GetMutex() );
- if(!m_pPropertyArrayHelper.get())
- {
- sal_Bool bSorted = sal_True;
- m_pPropertyArrayHelper = ::boost::shared_ptr< ::cppu::OPropertyArrayHelper >( new ::cppu::OPropertyArrayHelper( *StaticMinMaxLineWrapperPropertyArray::get(), bSorted ) );
- }
- // \--
- }
- return *m_pPropertyArrayHelper.get();
+ return *StaticMinMaxLineWrapperInfoHelper::get();
}
//XPropertySet
uno::Reference< beans::XPropertySetInfo > SAL_CALL MinMaxLineWrapper::getPropertySetInfo()
throw (uno::RuntimeException)
{
- if( !m_xInfo.is() )
- {
- // /--
- ::osl::MutexGuard aGuard( GetMutex() );
- if( !m_xInfo.is() )
- m_xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
- // \--
- }
- return m_xInfo;
+ return *StaticMinMaxLineWrapperInfo::get();
}
+
void SAL_CALL MinMaxLineWrapper::setPropertyValue( const ::rtl::OUString& rPropertyName, const uno::Any& rValue )
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
index 449a1f550860..31a67b600536 100755
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
@@ -123,12 +123,6 @@ private: //member
::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
::cppu::OInterfaceContainerHelper m_aEventListenerContainer;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySetInfo >
- m_xInfo;//outer PropertySetInfo
-
- ::boost::shared_ptr< ::cppu::OPropertyArrayHelper > m_pPropertyArrayHelper;
-
WrappedIgnoreProperty m_aWrappedLineJointProperty;
};
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index 241125169500..acfbcda4b043 100755
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -86,6 +86,33 @@ struct StaticUpDownBarWrapperPropertyArray : public rtl::StaticAggregate< Sequen
{
};
+struct StaticUpDownBarWrapperInfoHelper_Initializer
+{
+ ::cppu::OPropertyArrayHelper* operator()()
+ {
+ static ::cppu::OPropertyArrayHelper aPropHelper( *StaticUpDownBarWrapperPropertyArray::get() );
+ return &aPropHelper;
+ }
+};
+
+struct StaticUpDownBarWrapperInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticUpDownBarWrapperInfoHelper_Initializer >
+{
+};
+
+struct StaticUpDownBarWrapperInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticUpDownBarWrapperInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticUpDownBarWrapperInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticUpDownBarWrapperInfo_Initializer >
+{
+};
+
} // anonymous namespace
// --------------------------------------------------------------------------------
@@ -100,8 +127,6 @@ UpDownBarWrapper::UpDownBarWrapper(
: m_spChart2ModelContact( spChart2ModelContact )
, m_aEventListenerContainer( m_aMutex )
, m_aPropertySetName( bUp ? C2U("WhiteDay") : C2U("BlackDay") )
- , m_xInfo(0)
- , m_pPropertyArrayHelper()
{
}
@@ -115,11 +140,6 @@ void SAL_CALL UpDownBarWrapper::dispose()
{
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
-
- // /--
- MutexGuard aGuard( GetMutex());
- m_xInfo.clear();
- // \--
}
void SAL_CALL UpDownBarWrapper::addEventListener(
@@ -138,33 +158,14 @@ void SAL_CALL UpDownBarWrapper::removeEventListener(
::cppu::IPropertyArrayHelper& UpDownBarWrapper::getInfoHelper()
{
- if(!m_pPropertyArrayHelper.get())
- {
- // /--
- ::osl::MutexGuard aGuard( GetMutex() );
- if(!m_pPropertyArrayHelper.get())
- {
- sal_Bool bSorted = sal_True;
- m_pPropertyArrayHelper = ::boost::shared_ptr< ::cppu::OPropertyArrayHelper >( new ::cppu::OPropertyArrayHelper( *StaticUpDownBarWrapperPropertyArray::get(), bSorted ) );
- }
- // \--
- }
- return *m_pPropertyArrayHelper.get();
+ return *StaticUpDownBarWrapperInfoHelper::get();
}
//XPropertySet
uno::Reference< beans::XPropertySetInfo > SAL_CALL UpDownBarWrapper::getPropertySetInfo()
throw (uno::RuntimeException)
{
- if( !m_xInfo.is() )
- {
- // /--
- ::osl::MutexGuard aGuard( GetMutex() );
- if( !m_xInfo.is() )
- m_xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
- // \--
- }
- return m_xInfo;
+ return *StaticUpDownBarWrapperInfo::get();
}
void SAL_CALL UpDownBarWrapper::setPropertyValue( const ::rtl::OUString& rPropertyName, const uno::Any& rValue )
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
index 5b028a6acc66..f271bcbf2bb5 100755
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
@@ -123,11 +123,6 @@ private: //member
::cppu::OInterfaceContainerHelper m_aEventListenerContainer;
rtl::OUString m_aPropertySetName;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySetInfo >
- m_xInfo;//outer PropertySetInfo
- ::boost::shared_ptr< ::cppu::OPropertyArrayHelper > m_pPropertyArrayHelper;
-
};
} // namespace wrapper
diff --git a/chart2/source/inc/OPropertySet.hxx b/chart2/source/inc/OPropertySet.hxx
index fa773a6dab00..93dce272bf6e 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -96,39 +96,6 @@ protected:
*/
virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() = 0;
- // ____ XPropertySet ____
- /** sample implementation using the InfoHelper:
-
- <pre>
- uno::Reference&lt; beans::XPropertySetInfo &gt; SAL_CALL
- OPropertySet::getPropertySetInfo()
- throw (uno::RuntimeException)
- {
- static uno::Reference&lt; beans::XPropertySetInfo &gt; xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
- }
- </pre>
-
- <p>(The reason why this isn't implemented here is, that the static
- object is only valid per concrete PropertySet. Otherwise all
- PropertySets derived from this base calss would have the same
- properties.)</p>
-
- @see ::cppu::OPropertySetHelper
- */
-// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
-// getPropertySetInfo()
-// throw (::com::sun::star::uno::RuntimeException) = 0;
/** Try to convert the value <code>rValue</code> to the type required by the
property associated with <code>nHandle</code>.
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index 2652b7464a7c..9eb284541c19 100755
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -245,6 +245,20 @@ struct StaticAxisInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArra
{
};
+struct StaticAxisInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticAxisInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticAxisInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticAxisInfo_Initializer >
+{
+};
+
typedef uno::Reference< beans::XPropertySet > lcl_tSubGridType;
typedef uno::Sequence< lcl_tSubGridType > lcl_tSubGridSeq;
@@ -598,24 +612,11 @@ uno::Any Axis::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticAxisInfoHelper::get();
}
-
// ____ XPropertySet ____
-Reference< beans::XPropertySetInfo > SAL_CALL
- Axis::getPropertySetInfo()
+Reference< beans::XPropertySetInfo > SAL_CALL Axis::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticAxisInfo::get();
}
// ================================================================================
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx
index ae5db41da2b8..c8e20cb44d7a 100755
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -101,6 +101,20 @@ struct StaticCooSysInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyAr
{
};
+struct StaticCooSysInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticCooSysInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticCooSysInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticCooSysInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -382,22 +396,10 @@ uno::Any BaseCoordinateSystem::GetDefaultValue( sal_Int32 nHandle ) const
// ____ XPropertySet ____
-Reference< beans::XPropertySetInfo > SAL_CALL
- BaseCoordinateSystem::getPropertySetInfo()
+Reference< beans::XPropertySetInfo > SAL_CALL BaseCoordinateSystem::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticCooSysInfo::get();
}
using impl::BaseCoordinateSystem_Base;
diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx
index 5cd4cfef7f28..e658000cc9dd 100755
--- a/chart2/source/model/main/DataPoint.cxx
+++ b/chart2/source/model/main/DataPoint.cxx
@@ -81,6 +81,20 @@ struct StaticDataPointInfoHelper : public rtl::StaticAggregate< ::cppu::OPropert
{
};
+struct StaticDataPointInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticDataPointInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticDataPointInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticDataPointInfo_Initializer >
+{
+};
+
} // anonymous namespace
// ____________________________________________________________
@@ -222,22 +236,10 @@ void SAL_CALL DataPoint::setFastPropertyValue_NoBroadcast(
}
// ____ XPropertySet ____
-Reference< beans::XPropertySetInfo > SAL_CALL
- DataPoint::getPropertySetInfo()
+Reference< beans::XPropertySetInfo > SAL_CALL DataPoint::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticDataPointInfo::get();
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index cf0beedd0e71..7e4af43a2008 100755
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -84,6 +84,20 @@ struct StaticDataSeriesInfoHelper : public rtl::StaticAggregate< ::cppu::OProper
{
};
+struct StaticDataSeriesInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticDataSeriesInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticDataSeriesInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticDataSeriesInfo_Initializer >
+{
+};
+
void lcl_SetParent(
const uno::Reference< uno::XInterface > & xChildInterface,
const uno::Reference< uno::XInterface > & xParentInterface )
@@ -281,24 +295,11 @@ uno::Any DataSeries::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticDataSeriesInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- DataSeries::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL DataSeries::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticDataSeriesInfo::get();
}
void SAL_CALL DataSeries::getFastPropertyValue
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 4f86fc9fac51..fc65dd238f1a 100755
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -210,11 +210,23 @@ private:
return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
+struct StaticDiagramInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticDiagramInfoHelper_Initializer >
+{
+};
+struct StaticDiagramInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticDiagramInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
};
-struct StaticDiagramInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticDiagramInfoHelper_Initializer >
+struct StaticDiagramInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticDiagramInfo_Initializer >
{
};
@@ -623,24 +635,11 @@ uno::Any Diagram::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticDiagramInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- Diagram::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL Diagram::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticDiagramInfo::get();
}
// ____ XFastPropertySet ____
diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx
index 0486423db092..ab9aa4f8b33d 100755
--- a/chart2/source/model/main/FormattedString.cxx
+++ b/chart2/source/model/main/FormattedString.cxx
@@ -73,6 +73,20 @@ struct StaticFormattedStringInfoHelper : public rtl::StaticAggregate< ::cppu::OP
{
};
+struct StaticFormattedStringInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticFormattedStringInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticFormattedStringInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticFormattedStringInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -223,22 +237,10 @@ uno::Any FormattedString::GetDefaultValue( sal_Int32 nHandle ) const
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- FormattedString::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL FormattedString::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticFormattedStringInfo::get();
}
// ================================================================================
diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx
index 5dbd51ecda43..354cebf3e1dc 100755
--- a/chart2/source/model/main/GridProperties.cxx
+++ b/chart2/source/model/main/GridProperties.cxx
@@ -111,6 +111,20 @@ struct StaticGridInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArra
{
};
+struct StaticGridInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticGridInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticGridInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticGridInfo_Initializer >
+{
+};
+
} // anonymous namespace
// ____________________________________________________________
@@ -167,22 +181,10 @@ uno::Any GridProperties::GetDefaultValue( sal_Int32 nHandle ) const
}
// ____ XPropertySet ____
-Reference< beans::XPropertySetInfo > SAL_CALL
- GridProperties::getPropertySetInfo()
+Reference< beans::XPropertySetInfo > SAL_CALL GridProperties::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticGridInfo::get();
}
// ____ XCloneable ____
diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx
index ce9dbcac9ace..d268ccc1a924 100755
--- a/chart2/source/model/main/Legend.cxx
+++ b/chart2/source/model/main/Legend.cxx
@@ -149,6 +149,20 @@ struct StaticLegendInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyAr
{
};
+struct StaticLegendInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticLegendInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticLegendInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticLegendInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -330,24 +344,11 @@ Any Legend::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticLegendInfoHelper::get();
}
-
// ____ XPropertySet ____
-Reference< beans::XPropertySetInfo > SAL_CALL
- Legend::getPropertySetInfo()
+Reference< beans::XPropertySetInfo > SAL_CALL Legend::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticLegendInfo::get();
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx
index 53854b049924..0d7f55f47128 100755
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -89,6 +89,20 @@ struct StaticPageBackgroundInfoHelper : public rtl::StaticAggregate< ::cppu::OPr
{
};
+struct StaticPageBackgroundInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticPageBackgroundInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticPageBackgroundInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticPageBackgroundInfo_Initializer >
+{
+};
+
} // anonymous namespace
// ================================================================================
@@ -154,27 +168,13 @@ uno::Any PageBackground::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticPageBackgroundInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- PageBackground::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL PageBackground::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticPageBackgroundInfo::get();
}
-
// ____ XModifyBroadcaster ____
void SAL_CALL PageBackground::addModifyListener( const uno::Reference< util::XModifyListener >& aListener )
throw (uno::RuntimeException)
diff --git a/chart2/source/model/main/StockBar.cxx b/chart2/source/model/main/StockBar.cxx
index 73639211677f..098bbdd18f96 100755
--- a/chart2/source/model/main/StockBar.cxx
+++ b/chart2/source/model/main/StockBar.cxx
@@ -85,6 +85,20 @@ struct StaticStockBarInfoHelper : public rtl::StaticAggregate< ::cppu::OProperty
{
};
+struct StaticStockBarInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticStockBarInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticStockBarInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticStockBarInfo_Initializer >
+{
+};
+
void lcl_AddDefaultsToMap(
::chart::tPropertyValueMap & rOutMap )
{
@@ -168,25 +182,12 @@ uno::Any StockBar::GetDefaultValue( sal_Int32 nHandle ) const
}
// ____ XPropertySet ____
-Reference< beans::XPropertySetInfo > SAL_CALL
- StockBar::getPropertySetInfo()
+Reference< beans::XPropertySetInfo > SAL_CALL StockBar::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticStockBarInfo::get();
}
-
// ____ XModifyBroadcaster ____
void SAL_CALL StockBar::addModifyListener( const uno::Reference< util::XModifyListener >& aListener )
throw (uno::RuntimeException)
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index 7081c1b96d36..9d6c1811cf1f 100755
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -208,6 +208,20 @@ struct StaticTitleInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArr
{
};
+struct StaticTitleInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticTitleInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticTitleInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticTitleInfo_Initializer >
+{
+};
+
} // anonymous namespace
// ================================================================================
@@ -308,24 +322,11 @@ uno::Any Title::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticTitleInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- Title::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL Title::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticTitleInfo::get();
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx
index 5180191df49e..40bda5aa2465 100755
--- a/chart2/source/model/main/Wall.cxx
+++ b/chart2/source/model/main/Wall.cxx
@@ -94,6 +94,20 @@ struct StaticWallInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArra
{
};
+struct StaticWallInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticWallInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticWallInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticWallInfo_Initializer >
+{
+};
+
} // anonymous namespace
// ================================================================================
@@ -160,24 +174,11 @@ uno::Any Wall::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticWallInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- Wall::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL Wall::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticWallInfo::get();
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx
index 98ee784d1bee..6ac90ee4cb38 100755
--- a/chart2/source/model/template/AreaChartTypeTemplate.cxx
+++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx
@@ -102,6 +102,20 @@ struct StaticAreaChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cp
{
};
+struct StaticAreaChartTypeTemplateInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticAreaChartTypeTemplateInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticAreaChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticAreaChartTypeTemplateInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -152,24 +166,11 @@ uno::Any AreaChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticAreaChartTypeTemplateInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- AreaChartTypeTemplate::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL AreaChartTypeTemplate::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticAreaChartTypeTemplateInfo::get();
}
sal_Int32 AreaChartTypeTemplate::getDimension() const
diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx
index 2261a22af6d8..e73e74966611 100755
--- a/chart2/source/model/template/BarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BarChartTypeTemplate.cxx
@@ -110,6 +110,20 @@ struct StaticBarChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cpp
{
};
+struct StaticBarChartTypeTemplateInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticBarChartTypeTemplateInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticBarChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticBarChartTypeTemplateInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -245,24 +259,11 @@ uno::Any BarChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticBarChartTypeTemplateInfoHelper::get();
}
-
// ____ XPropertySet ____
-Reference< beans::XPropertySetInfo > SAL_CALL
- BarChartTypeTemplate::getPropertySetInfo()
+Reference< beans::XPropertySetInfo > SAL_CALL BarChartTypeTemplate::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticBarChartTypeTemplateInfo::get();
}
void SAL_CALL BarChartTypeTemplate::applyStyle(
diff --git a/chart2/source/model/template/BubbleChartType.cxx b/chart2/source/model/template/BubbleChartType.cxx
index 37438d4c4744..5be8e1c17c83 100755
--- a/chart2/source/model/template/BubbleChartType.cxx
+++ b/chart2/source/model/template/BubbleChartType.cxx
@@ -86,6 +86,20 @@ struct StaticBubbleChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OP
{
};
+struct StaticBubbleChartTypeInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticBubbleChartTypeInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticBubbleChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticBubbleChartTypeInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -205,24 +219,11 @@ uno::Any BubbleChartType::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticBubbleChartTypeInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- BubbleChartType::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL BubbleChartType::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticBubbleChartTypeInfo::get();
}
uno::Sequence< ::rtl::OUString > BubbleChartType::getSupportedServiceNames_Static()
diff --git a/chart2/source/model/template/BubbleChartTypeTemplate.cxx b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
index 5c05960ecb5b..a81a0c7ef36b 100755
--- a/chart2/source/model/template/BubbleChartTypeTemplate.cxx
+++ b/chart2/source/model/template/BubbleChartTypeTemplate.cxx
@@ -96,6 +96,20 @@ struct StaticBubbleChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::
{
};
+struct StaticBubbleChartTypeTemplateInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticBubbleChartTypeTemplateInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticBubbleChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticBubbleChartTypeTemplateInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -142,24 +156,11 @@ uno::Any BubbleChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticBubbleChartTypeTemplateInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- BubbleChartTypeTemplate::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL BubbleChartTypeTemplate::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticBubbleChartTypeTemplateInfo::get();
}
sal_Int32 BubbleChartTypeTemplate::getDimension() const
diff --git a/chart2/source/model/template/CandleStickChartType.cxx b/chart2/source/model/template/CandleStickChartType.cxx
index 19c65522338c..190fdb1391d5 100755
--- a/chart2/source/model/template/CandleStickChartType.cxx
+++ b/chart2/source/model/template/CandleStickChartType.cxx
@@ -132,6 +132,20 @@ struct StaticCandleStickChartTypeInfoHelper : public rtl::StaticAggregate< ::cpp
{
};
+struct StaticCandleStickChartTypeInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticCandleStickChartTypeInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticCandleStickChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticCandleStickChartTypeInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -290,24 +304,11 @@ uno::Any CandleStickChartType::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticCandleStickChartTypeInfoHelper::get();
}
-
// ____ XPropertySet ____
-Reference< beans::XPropertySetInfo > SAL_CALL
- CandleStickChartType::getPropertySetInfo()
+Reference< beans::XPropertySetInfo > SAL_CALL CandleStickChartType::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticCandleStickChartTypeInfo::get();
}
void SAL_CALL CandleStickChartType::setFastPropertyValue_NoBroadcast(
diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx
index 22a744769fc6..146c06934a46 100755
--- a/chart2/source/model/template/ChartType.cxx
+++ b/chart2/source/model/template/ChartType.cxx
@@ -230,34 +230,51 @@ uno::Any ChartType::GetDefaultValue( sal_Int32 /* nHandle */ ) const
return uno::Any();
}
-// ____ OPropertySet ____
-::cppu::IPropertyArrayHelper & SAL_CALL ChartType::getInfoHelper()
+namespace
{
- // using assignment for broken gcc 3.3
- static ::cppu::OPropertyArrayHelper aArrayHelper = ::cppu::OPropertyArrayHelper(
- Sequence< beans::Property >(), /* bSorted */ sal_True );
-
- return aArrayHelper;
-}
+struct StaticChartTypeInfoHelper_Initializer
+{
+ ::cppu::OPropertyArrayHelper* operator()()
+ {
+ // using assignment for broken gcc 3.3
+ static ::cppu::OPropertyArrayHelper aPropHelper = ::cppu::OPropertyArrayHelper(
+ Sequence< beans::Property >() );
+ return &aPropHelper;
+ }
+};
-// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- ChartType::getPropertySetInfo()
- throw (uno::RuntimeException)
+struct StaticChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticChartTypeInfoHelper_Initializer >
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
+};
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
+struct StaticChartTypeInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
{
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticChartTypeInfoHelper::get() ) );
+ return &xPropertySetInfo;
}
+};
+
+struct StaticChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticChartTypeInfo_Initializer >
+{
+};
+
+}
- return xInfo;
- // \--
+// ____ OPropertySet ____
+::cppu::IPropertyArrayHelper & SAL_CALL ChartType::getInfoHelper()
+{
+ return *StaticChartTypeInfoHelper::get();
+}
+
+// ____ XPropertySet ____
+uno::Reference< beans::XPropertySetInfo > SAL_CALL ChartType::getPropertySetInfo()
+ throw (uno::RuntimeException)
+{
+ return *StaticChartTypeInfo::get();
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/template/ColumnChartType.cxx b/chart2/source/model/template/ColumnChartType.cxx
index 7393717846f5..6e655c4681e9 100755
--- a/chart2/source/model/template/ColumnChartType.cxx
+++ b/chart2/source/model/template/ColumnChartType.cxx
@@ -105,6 +105,20 @@ struct StaticColumnChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OP
{
};
+struct StaticColumnChartTypeInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticColumnChartTypeInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticColumnChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticColumnChartTypeInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -166,24 +180,11 @@ uno::Any ColumnChartType::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticColumnChartTypeInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- ColumnChartType::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL ColumnChartType::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticColumnChartTypeInfo::get();
}
//
diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
index 8ed512eba408..5431b75e4218 100755
--- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx
@@ -108,6 +108,20 @@ struct StaticColumnLineChartTypeTemplateInfoHelper : public rtl::StaticAggregate
{
};
+struct StaticColumnLineChartTypeTemplateInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticColumnLineChartTypeTemplateInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticColumnLineChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticColumnLineChartTypeTemplateInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -158,24 +172,11 @@ uno::Any ColumnLineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticColumnLineChartTypeTemplateInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- ColumnLineChartTypeTemplate::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL ColumnLineChartTypeTemplate::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticColumnLineChartTypeTemplateInfo::get();
}
void ColumnLineChartTypeTemplate::createChartTypes(
diff --git a/chart2/source/model/template/LineChartType.cxx b/chart2/source/model/template/LineChartType.cxx
index 166d037d1a1d..4f3aaa21c6cb 100755
--- a/chart2/source/model/template/LineChartType.cxx
+++ b/chart2/source/model/template/LineChartType.cxx
@@ -115,6 +115,20 @@ struct StaticLineChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPro
{
};
+struct StaticLineChartTypeInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticLineChartTypeInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticLineChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticLineChartTypeInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -178,24 +192,11 @@ uno::Any LineChartType::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticLineChartTypeInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- LineChartType::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL LineChartType::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticLineChartTypeInfo::get();
}
uno::Sequence< ::rtl::OUString > LineChartType::getSupportedServiceNames_Static()
diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx
index 454ee975e1e5..212785894603 100755
--- a/chart2/source/model/template/LineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.cxx
@@ -125,6 +125,20 @@ struct StaticLineChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cp
{
};
+struct StaticLineChartTypeTemplateInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticLineChartTypeTemplateInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticLineChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticLineChartTypeTemplateInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -180,24 +194,11 @@ uno::Any LineChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticLineChartTypeTemplateInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- LineChartTypeTemplate::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL LineChartTypeTemplate::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticLineChartTypeTemplateInfo::get();
}
sal_Int32 LineChartTypeTemplate::getDimension() const
diff --git a/chart2/source/model/template/NetChartType.cxx b/chart2/source/model/template/NetChartType.cxx
index ddf001b2a6e4..bba666bb006c 100755
--- a/chart2/source/model/template/NetChartType.cxx
+++ b/chart2/source/model/template/NetChartType.cxx
@@ -108,31 +108,51 @@ uno::Any NetChartType_Base::GetDefaultValue( sal_Int32 /*nHandle*/ ) const
return uno::Any();
}
+namespace
+{
+
+struct StaticNetChartTypeInfoHelper_Initializer
+{
+ ::cppu::OPropertyArrayHelper* operator()()
+ {
+ // using assignment for broken gcc 3.3
+ static ::cppu::OPropertyArrayHelper aPropHelper = ::cppu::OPropertyArrayHelper(
+ Sequence< beans::Property >() );
+ return &aPropHelper;
+ }
+};
+
+struct StaticNetChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticNetChartTypeInfoHelper_Initializer >
+{
+};
+
+struct StaticNetChartTypeInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticNetChartTypeInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticNetChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticNetChartTypeInfo_Initializer >
+{
+};
+
+}
+
// ____ OPropertySet ____
::cppu::IPropertyArrayHelper & SAL_CALL NetChartType_Base::getInfoHelper()
{
- uno::Sequence< beans::Property > aProps;
- static ::cppu::OPropertyArrayHelper aArrayHelper(aProps);
- return aArrayHelper;
+ return *StaticNetChartTypeInfoHelper::get();
}
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- NetChartType_Base::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL NetChartType_Base::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticNetChartTypeInfo::get();
}
//-----------------------------------------------------------------------------
diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx
index 5e1decd73a72..a272f95f4dea 100755
--- a/chart2/source/model/template/PieChartType.cxx
+++ b/chart2/source/model/template/PieChartType.cxx
@@ -99,6 +99,20 @@ struct StaticPieChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::OProp
{
};
+struct StaticPieChartTypeInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticPieChartTypeInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticPieChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticPieChartTypeInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -203,24 +217,11 @@ uno::Any PieChartType::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticPieChartTypeInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- PieChartType::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL PieChartType::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticPieChartTypeInfo::get();
}
uno::Sequence< ::rtl::OUString > PieChartType::getSupportedServiceNames_Static()
diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx
index 2bb58e7ddbb6..fc455ff99fc1 100755
--- a/chart2/source/model/template/PieChartTypeTemplate.cxx
+++ b/chart2/source/model/template/PieChartTypeTemplate.cxx
@@ -135,6 +135,20 @@ struct StaticPieChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::cpp
{
};
+struct StaticPieChartTypeTemplateInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticPieChartTypeTemplateInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticPieChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticPieChartTypeTemplateInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -187,27 +201,13 @@ uno::Any PieChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticPieChartTypeTemplateInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- PieChartTypeTemplate::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL PieChartTypeTemplate::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticPieChartTypeTemplateInfo::get();
}
-
// ____ ChartTypeTemplate ____
sal_Int32 PieChartTypeTemplate::getDimension() const
{
diff --git a/chart2/source/model/template/ScatterChartType.cxx b/chart2/source/model/template/ScatterChartType.cxx
index 559711794405..571784928f04 100755
--- a/chart2/source/model/template/ScatterChartType.cxx
+++ b/chart2/source/model/template/ScatterChartType.cxx
@@ -119,6 +119,20 @@ struct StaticScatterChartTypeInfoHelper : public rtl::StaticAggregate< ::cppu::O
{
};
+struct StaticScatterChartTypeInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticScatterChartTypeInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticScatterChartTypeInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticScatterChartTypeInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -260,24 +274,11 @@ uno::Any ScatterChartType::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticScatterChartTypeInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- ScatterChartType::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL ScatterChartType::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticScatterChartTypeInfo::get();
}
uno::Sequence< ::rtl::OUString > ScatterChartType::getSupportedServiceNames_Static()
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
index d462c2fa489d..e922e8450e55 100755
--- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
@@ -127,6 +127,20 @@ struct StaticScatterChartTypeTemplateInfoHelper : public rtl::StaticAggregate< :
{
};
+struct StaticScatterChartTypeTemplateInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticScatterChartTypeTemplateInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticScatterChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticScatterChartTypeTemplateInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -181,24 +195,11 @@ uno::Any ScatterChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticScatterChartTypeTemplateInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- ScatterChartTypeTemplate::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL ScatterChartTypeTemplate::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticScatterChartTypeTemplateInfo::get();
}
sal_Int32 ScatterChartTypeTemplate::getDimension() const
diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx
index 98e7d3269825..814fe460b0d1 100755
--- a/chart2/source/model/template/StockChartTypeTemplate.cxx
+++ b/chart2/source/model/template/StockChartTypeTemplate.cxx
@@ -138,6 +138,20 @@ struct StaticStockChartTypeTemplateInfoHelper : public rtl::StaticAggregate< ::c
{
};
+struct StaticStockChartTypeTemplateInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticStockChartTypeTemplateInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticStockChartTypeTemplateInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticStockChartTypeTemplateInfo_Initializer >
+{
+};
+
} // anonymous namespace
// ----------------------------------------
@@ -198,24 +212,11 @@ uno::Any StockChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticStockChartTypeTemplateInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- StockChartTypeTemplate::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL StockChartTypeTemplate::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticStockChartTypeTemplateInfo::get();
}
sal_Int32 StockChartTypeTemplate::getAxisCountByDimension( sal_Int32 nDimension )
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index e1500a5e16b5..2f87ed11176e 100755
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -145,6 +145,20 @@ struct StaticErrorBarInfoHelper : public rtl::StaticAggregate< ::cppu::OProperty
{
};
+struct StaticErrorBarInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticErrorBarInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticErrorBarInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticErrorBarInfo_Initializer >
+{
+};
+
bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{
uno::Reference< lang::XServiceInfo > xServiceInfo( xLSeq, uno::UNO_QUERY );
@@ -228,24 +242,11 @@ uno::Any ErrorBar::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticErrorBarInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- ErrorBar::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL ErrorBar::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticErrorBarInfo::get();
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/tools/RegressionCurveModel.cxx b/chart2/source/tools/RegressionCurveModel.cxx
index 02c3e164e742..12a9b876134c 100755
--- a/chart2/source/tools/RegressionCurveModel.cxx
+++ b/chart2/source/tools/RegressionCurveModel.cxx
@@ -88,6 +88,20 @@ struct StaticRegressionCurveInfoHelper : public rtl::StaticAggregate< ::cppu::OP
{
};
+struct StaticRegressionCurveInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticRegressionCurveInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticRegressionCurveInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticRegressionCurveInfo_Initializer >
+{
+};
+
} // anonymous namespace
namespace chart
@@ -258,24 +272,11 @@ uno::Any RegressionCurveModel::GetDefaultValue( sal_Int32 nHandle ) const
return *StaticRegressionCurveInfoHelper::get();
}
-
// ____ XPropertySet ____
-uno::Reference< beans::XPropertySetInfo > SAL_CALL
- RegressionCurveModel::getPropertySetInfo()
+uno::Reference< beans::XPropertySetInfo > SAL_CALL RegressionCurveModel::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static uno::Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticRegressionCurveInfo::get();
}
// ================================================================================
diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx
index 747f673a9c34..28402986d389 100755
--- a/chart2/source/tools/RegressionEquation.cxx
+++ b/chart2/source/tools/RegressionEquation.cxx
@@ -165,6 +165,20 @@ struct StaticRegressionEquationInfoHelper : public rtl::StaticAggregate< ::cppu:
{
};
+struct StaticRegressionEquationInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticRegressionEquationInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticRegressionEquationInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticRegressionEquationInfo_Initializer >
+{
+};
+
} // anonymous namespace
// ____________________________________________________________
@@ -231,25 +245,12 @@ uno::Any RegressionEquation::GetDefaultValue( sal_Int32 nHandle ) const
}
// ____ XPropertySet ____
-Reference< beans::XPropertySetInfo > SAL_CALL
- RegressionEquation::getPropertySetInfo()
+Reference< beans::XPropertySetInfo > SAL_CALL RegressionEquation::getPropertySetInfo()
throw (uno::RuntimeException)
{
- static Reference< beans::XPropertySetInfo > xInfo;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !xInfo.is())
- {
- xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo(
- getInfoHelper());
- }
-
- return xInfo;
- // \--
+ return *StaticRegressionEquationInfo::get();
}
-
// ____ XModifyBroadcaster ____
void SAL_CALL RegressionEquation::addModifyListener( const uno::Reference< util::XModifyListener >& aListener )
throw (uno::RuntimeException)
diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx
index 843aeb261a5f..9b752634a264 100755
--- a/chart2/source/tools/WrappedPropertySet.cxx
+++ b/chart2/source/tools/WrappedPropertySet.cxx
@@ -66,8 +66,7 @@ Reference< beans::XPropertyState > WrappedPropertySet::getInnerPropertyState()
void WrappedPropertySet::clearWrappedPropertySet()
{
- // /--
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );//do not use different mutex than is already used for static property sequence
//delete all wrapped properties
if(m_pWrappedPropertyMap)
@@ -84,22 +83,27 @@ void WrappedPropertySet::clearWrappedPropertySet()
DELETEZ(m_pWrappedPropertyMap);
m_xInfo = NULL;
- // \--
}
//XPropertySet
Reference< beans::XPropertySetInfo > SAL_CALL WrappedPropertySet::getPropertySetInfo( )
throw (uno::RuntimeException)
{
- if( !m_xInfo.is() )
+ Reference< beans::XPropertySetInfo > xInfo = m_xInfo;
+ if( !xInfo.is() )
{
- // /--
- ::osl::MutexGuard aGuard( m_aMutex );
- if( !m_xInfo.is() )
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );//do not use different mutex than is already used for static property sequence
+ xInfo = m_xInfo;
+ if( !xInfo.is() )
{
- m_xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
+ xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
+ OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
+ m_xInfo = xInfo;
}
- // \--
+ }
+ else
+ {
+ OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
}
return m_xInfo;
}
@@ -435,16 +439,21 @@ Sequence< Any > SAL_CALL WrappedPropertySet::getPropertyDefaults( const Sequence
::cppu::IPropertyArrayHelper& WrappedPropertySet::getInfoHelper()
{
- if(!m_pPropertyArrayHelper)
+ ::cppu::OPropertyArrayHelper* p = m_pPropertyArrayHelper;
+ if(!p)
{
- // /--
- ::osl::MutexGuard aGuard( m_aMutex );
- if(!m_pPropertyArrayHelper)
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );//do not use different mutex than is already used for static property sequence
+ p = m_pPropertyArrayHelper;
+ if(!p)
{
- sal_Bool bSorted = sal_True;
- m_pPropertyArrayHelper = new ::cppu::OPropertyArrayHelper( getPropertySequence(), bSorted );
+ p = new ::cppu::OPropertyArrayHelper( getPropertySequence(), sal_True );
+ OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
+ m_pPropertyArrayHelper = p;
}
- // \--
+ }
+ else
+ {
+ OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
}
return *m_pPropertyArrayHelper;
}
@@ -453,14 +462,15 @@ Sequence< Any > SAL_CALL WrappedPropertySet::getPropertyDefaults( const Sequence
tWrappedPropertyMap& WrappedPropertySet::getWrappedPropertyMap()
{
- if(!m_pWrappedPropertyMap)
+ tWrappedPropertyMap* p = m_pWrappedPropertyMap;
+ if(!p)
{
- // /--
- ::osl::MutexGuard aGuard( m_aMutex );
- if(!m_pWrappedPropertyMap)
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );//do not use different mutex than is already used for static property sequence
+ p = m_pWrappedPropertyMap;
+ if(!p)
{
std::vector< WrappedProperty* > aPropList( createWrappedProperties() );
- m_pWrappedPropertyMap = new tWrappedPropertyMap();
+ p = new tWrappedPropertyMap();
for( std::vector< WrappedProperty* >::const_iterator aIt = aPropList.begin(); aIt!=aPropList.end(); ++aIt )
{
@@ -474,18 +484,24 @@ tWrappedPropertyMap& WrappedPropertySet::getWrappedPropertyMap()
OSL_ENSURE( false, "missing property in property list" );
delete pProperty;//we are owner or the created WrappedProperties
}
- else if( m_pWrappedPropertyMap->find( nHandle ) != m_pWrappedPropertyMap->end() )
+ else if( p->find( nHandle ) != p->end() )
{
//duplicate Wrapped property
OSL_ENSURE( false, "duplicate Wrapped property" );
delete pProperty;//we are owner or the created WrappedProperties
}
else
- (*m_pWrappedPropertyMap)[ nHandle ] = pProperty;
+ (*p)[ nHandle ] = pProperty;
}
}
+
+ OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
+ m_pWrappedPropertyMap = p;
}
- // \--
+ }
+ else
+ {
+ OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
}
return *m_pWrappedPropertyMap;
}