summaryrefslogtreecommitdiff
path: root/chart2/source/model/main/Wall.cxx
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 /chart2/source/model/main/Wall.cxx
parentf0a13fa4339ee940f267fb8787d6137b148abec9 (diff)
chart49: #i113103# use corrected double-checked locking pattern for propertysetinfo
Diffstat (limited to 'chart2/source/model/main/Wall.cxx')
-rwxr-xr-xchart2/source/model/main/Wall.cxx31
1 files changed, 16 insertions, 15 deletions
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 ____